Created
December 5, 2018 16:45
-
-
Save happyincent/3a5cd11753bc7f194e4103c743f38167 to your computer and use it in GitHub Desktop.
Enable the GPU within a docker container running on an NVIDIA Jetson TX2. ref: https://git.io/fp1ZW
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
test: | |
container_name: test-tensorflow | |
image: ubuntu:test-tensorflow | |
build: . | |
restart: always | |
command: sh -c "ldconfig /usr/local/cuda/lib64/ /usr/lib/aarch64-linux-gnu/tegra/ && tail -f /dev/null" | |
volumes: | |
- '/usr/lib/aarch64-linux-gnu:/usr/lib/aarch64-linux-gnu' | |
- '/usr/local/cuda:/usr/local/cuda' | |
devices: | |
- '/dev/nvhost-ctrl:/dev/nvhost-ctrl' | |
- '/dev/nvhost-ctrl-gpu:/dev/nvhost-ctrl-gpu' | |
- '/dev/nvhost-prof-gpu:/dev/nvhost-prof-gpu' | |
- '/dev/nvmap:/dev/nvmap' | |
- '/dev/nvhost-gpu:/dev/nvhost-gpu' | |
- '/dev/nvhost-as-gpu' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dockerfile:
FROM ubuntu:16.04
RUN apt update &&
apt install python3 python3-pip -y
RUN pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp33 tensorflow-gpu