-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
61 lines (47 loc) · 1.37 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM nvidia/cuda:10.2-devel-ubuntu18.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
git \
ninja-build \
software-properties-common \
pkg-config \
unzip \
wget \
libgl1-mesa-glx \
libgl1 \
zsh
ARG PYTHON=python3.8
ENV LANG C.UTF-8
RUN add-apt-repository ppa:deadsnakes/ppa && apt-get update && apt-get install -y \
${PYTHON} \
python3-distutils \
python3-apt \
python3-dev \
${PYTHON}-dev
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN ${PYTHON} get-pip.py
RUN ln -sf /usr/bin/${PYTHON} /usr/local/bin/python3
RUN ln -sf /usr/local/bin/pip /usr/local/bin/pip3
RUN pip3 --no-cache-dir install --upgrade \
pip \
setuptools
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python
ARG BASE=/app
RUN mkdir ${BASE}
RUN mkdir /data
COPY requirements.txt ${BASE}/requirements.txt
COPY training_tools ${BASE}/training_tools
RUN cd ${BASE}/training_tools && pip3 install .
WORKDIR ${BASE}
RUN pip3 install -r requirements.txt
# you can change these to the values of your user to avoid permission problems
ARG UNAME=one_model
ARG UID=1000
ARG GID=100
RUN groupadd -g $GID -o $UNAME
RUN useradd -m -u $UID -g $GID -o -s /bin/zsh $UNAME
USER $UNAME
RUN git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
RUN cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
CMD ["/bin/zsh"]