-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
39 lines (30 loc) · 872 Bytes
/
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
FROM anibali/pytorch:1.10.0-nocuda
# Set up time zone.
ENV TZ=UTC
RUN sudo ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
RUN sudo apt-get update \
&& sudo apt-get install -y libgl1-mesa-glx libgtk2.0-0 libsm6 libxext6 \
&& sudo rm -rf /var/lib/apt/lists/*
# Install requirements
COPY requirements.txt .
RUN python -m pip install --upgrade pip && pip install --no-cache -r requirements.txt
# Copy contents
COPY . /app
# Change workdir
WORKDIR /app
RUN sudo chmod -R ugo+rwx /app
RUN sudo chmod ugo+rwx /root
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
RUN mkdir -p /root/.streamlit/ && sudo chmod ugo+rwx /root/.streamlit/
RUN bash -c 'echo -e "\
[general]\n\
email = \"\"\n\
" > /root/.streamlit/credentials.toml'
RUN bash -c 'echo -e "\
[server]\n\
enableCORS = false\n\
" > /root/.streamlit/config.toml'
EXPOSE 8501
ENTRYPOINT ["streamlit"]
CMD ["run", "startup.py"]