forked from autogoal/autogoal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
72 lines (53 loc) · 1.52 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
62
63
64
65
66
67
68
69
70
71
72
# =====================
# GPU base image
# ---------------------
FROM tensorflow/tensorflow:latest-gpu-py3
RUN pip install -U pip
RUN pip install tensorflow_addons==0.9.1
RUN pip install torch torchvision
# =====================
# User stuff
# ---------------------
RUN apt-get update \
&& apt-get install -y \
curl \
dumb-init \
htop \
locales \
man \
nano \
git \
procps \
ssh \
sudo \
vim \
graphviz \
&& rm -rf /var/lib/apt/lists/*
# https://wiki.debian.org/Locale#Manually
RUN sed -i "s/# en_US.UTF-8/en_US.UTF-8/" /etc/locale.gen \
&& locale-gen
ENV LANG=en_US.UTF-8
RUN chsh -s /bin/bash
ENV SHELL=/bin/bash
RUN adduser --gecos '' --disabled-password coder && \
echo "coder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/nopasswd
# ==========================================
# Project-specific installation instruction
# ------------------------------------------
COPY bash.bashrc /etc
RUN chmod +x /etc/bash.bashrc
ENV BUILD_ENVIRONMENT="development"
ENV XDG_CACHE_HOME="/opt/dev/cache"
WORKDIR /home/coder/autogoal
COPY pyproject.toml poetry.lock makefile /home/coder/autogoal/
# Use system's Python for installing dev tools
RUN make env
RUN poetry install -E dev -E contrib
EXPOSE 8501
EXPOSE 8000
USER coder
VOLUME /home/coder/.autogoal
RUN mkdir -p /home/coder/.autogoal/data && chown coder:coder /home/coder/.autogoal
COPY ./ /home/coder/autogoal
RUN sudo ln -s /home/coder/autogoal/autogoal /usr/lib/python3/dist-packages/autogoal
CMD [ "python", "-m", "autogoal", "demo" ]