-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (34 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Base image: CUDA and CUDNN configured for Ubuntu 18.04
FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
COPY requirements.txt /
WORKDIR /
# Update Ubuntu 18 and install Python in the correct version.
RUN apt-get update && apt-get upgrade -y
RUN apt-get install build-essential zip unzip -y
RUN apt-get install python3.6 python3.6-dev -y
RUN ln -sf /usr/bin/python3.6 /usr/bin/python3
# Install pip and install python enviroment
RUN apt-get install python3-pip -y
RUN python3 -m pip install pip --upgrade
RUN apt-get install -y libsm6 libxext6 libxrender-dev
RUN python3 -m pip install -r requirements.txt
# Install AMP for mixed precision training
RUN apt-get install git -y
RUN git clone https://github.com/dscarmo/apex
RUN python3 -m pip install --no-cache-dir ./apex
# Copy git repo/jupyter start script and setup it
COPY start.sh /home
RUN chmod +x /home/start.sh
# Copy original BraTS data
COPY data/data.zip /home
WORKDIR /home/
# Be able to see Jupyter citations
RUN python3 -m pip install cite2c
RUN python3 -m cite2c.install
# Startup command
CMD ["./start.sh"]
# Build command: sudo docker build -t dscarmo/btrseg .
# Release command: sudo docker run -p 8888:8888 --shm-size 256m --gpus all dscarmo/btrseg
# Kill running containers (stop jupyter server): sudo docker kill $(sudo docker ps -q)
# Remove dangling images: sudo docker image prune
# Remove dangling containers: sudo docker container prune