Note: I changed files a bit when uploading, so please make issue if you encountered an error.
- Setup
nvidia-container-toolkit
anddocker
into your host Linux. (No CUDA needed in host.) - Clone this repo
- 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 ownDockerfile
: timezone: if you living in other than Asia/Tokyo.
docker compose build --build-arg UID=$(id -u) --build-arg GID=$(id -g)
docker compose up -d
- Access http://localhost:8888/ and type your PW
- Your home folder in host Linux is mounted in
/shared
and/home/shared
(latter is symlink of former) - Micromamba is installed instead of conda (conda -> micromamba alias is set).
- 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
- Cache of pip and micromamba is shared to host's ones. If you don't like them, comment out in
docker-compose.yml
.