add docker config, gitignore
This commit is contained in:
parent
8a2a9643d4
commit
4eb149867c
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.ipynb_checkpoints
|
||||
datasets
|
||||
1-intro/data
|
4
0-install/.env
Normal file
4
0-install/.env
Normal file
@ -0,0 +1,4 @@
|
||||
ROOT_DIR=/home/wmi/repos
|
||||
JUPYTER_PORT=42065
|
||||
JUPYTER_TOKEN=some_token
|
||||
JUPYTER_DIR=/jupyter
|
33
0-install/docker-compose.yml
Normal file
33
0-install/docker-compose.yml
Normal file
@ -0,0 +1,33 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
jupyter-server:
|
||||
image: dl-jupyter
|
||||
init: true
|
||||
build:
|
||||
context: ./
|
||||
dockerfile: jupyter.Dockerfile
|
||||
env_file: ./.env
|
||||
ports:
|
||||
- ${JUPYTER_PORT}:${JUPYTER_PORT}
|
||||
volumes:
|
||||
- ${ROOT_DIR}:/jupyter
|
||||
environment:
|
||||
- NVIDIA_VISIBLE_DEVICES=all
|
||||
command:
|
||||
[
|
||||
"jupyter",
|
||||
"notebook",
|
||||
"--ip=*",
|
||||
"--port=${JUPYTER_PORT}",
|
||||
"--allow-root",
|
||||
"--notebook-dir=${JUPYTER_DIR}",
|
||||
'--NotebookApp.token=${JUPYTER_TOKEN}'
|
||||
]
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- 'driver': 'nvidia'
|
||||
'count': 1
|
||||
'capabilities': ['gpu', 'utility', 'compute']
|
||||
|
11
0-install/jupyter.Dockerfile
Executable file
11
0-install/jupyter.Dockerfile
Executable file
@ -0,0 +1,11 @@
|
||||
FROM nvidia/cuda:10.2-runtime AS jupyter-base
|
||||
WORKDIR /
|
||||
RUN apt update && apt install -y --no-install-recommends \
|
||||
git build-essential \
|
||||
python3-dev python3-pip python3-setuptools
|
||||
RUN pip3 -q install pip --upgrade
|
||||
|
||||
RUN pip3 install jupyter numpy pandas torch torchvision tensorboardX
|
||||
|
||||
FROM jupyter-base
|
||||
RUN pip3 install transformers barbar matplotlib
|
Loading…
Reference in New Issue
Block a user