Last active
December 31, 2023 15:41
-
-
Save frederikstroem/49d8f8075f924f7e8102503923795ab4 to your computer and use it in GitHub Desktop.
Run tensorflow/tensorflow:latest-gpu-jupyter docker image on localhost without having to authenticate. Useful if you SSH into your machine etc.
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.9" | |
# https://www.tensorflow.org/install/docker | |
services: | |
tensorflow: | |
image: tensorflow/tensorflow:latest-gpu-jupyter # https://hub.docker.com/r/tensorflow/tensorflow/ | |
container_name: tensorflow | |
hostname: tensorflow | |
# https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/dockerfiles/dockerfiles/gpu-jupyter.Dockerfile | |
# https://stackoverflow.com/a/60327026 | |
# https://stackoverflow.com/a/47509274 | |
command: bash -c "source /etc/bash.bashrc && jupyter notebook --notebook-dir=/tf --ip 0.0.0.0 --no-browser --allow-root --NotebookApp.token='' --NotebookApp.password=''" | |
restart: unless-stopped | |
environment: | |
- PUID=1000 | |
- PGID=1000 | |
- TZ=Etc/UTC | |
# https://stackoverflow.com/a/68385928 | |
deploy: | |
resources: | |
reservations: | |
devices: | |
- capabilities: [gpu, utility, compute, video] | |
ports: | |
- 127.0.0.1:8888:8888 | |
volumes: | |
- ~/tensorflow/notebooks:/tf/notebooks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment