Skip to content

ys-clarry/docker-jupyterlab-gpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker scripts for making jupyter lab + GPU container on Linux

Note: I changed files a bit when uploading, so please make issue if you encountered an error.

Usage:

  1. Setup nvidia-container-toolkit and docker into your host Linux. (No CUDA needed in host.)
  2. Clone this repo
  3. Modify below:
  • docker-compose.yml: extra_hosts: type docker host's IP (this is for Dash, see below)
  • configs/jupyter_server_config.py: hashed_password: replace to your own
  • Dockerfile: timezone: if you living in other than Asia/Tokyo.
  1. docker compose build --build-arg UID=$(id -u) --build-arg GID=$(id -g)
  2. docker compose up -d
  3. Access http://localhost:8888/ and type your PW

Tips

  1. Your home folder in host Linux is mounted in /shared and /home/shared (latter is symlink of former)
  2. Micromamba is installed instead of conda (conda -> micromamba alias is set).
  3. Using Dash is tricky but possible, like below:
app = JupyterDash(__name__, server_url='http://YOUR-DOCKER-HOST:EXPOSED-PORT/')
app.run_server(mode='jupyterlab', host="0.0.0.0", port=EXPOSED-PORT)
# YOUR-DOCKER-HOST can be `gateway` if you specified in `docker-compose.yml`
# port 9000-9004 is exposed as default
  1. Cache of pip and micromamba is shared to host's ones. If you don't like them, comment out in docker-compose.yml.

About

Docker container build script for JupyterLab + GPU on Linux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published