-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
47 lines (37 loc) · 1.17 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
# base image
# a little overkill but need it to install dot cli for dtreeviz
FROM ubuntu:18.04
# ubuntu installing - python, pip, graphviz
RUN apt-get update &&\
apt-get install python3.7 -y &&\
apt-get install python3-pip -y &&\
# apt-get install graphviz -y &&\
apt-get install -y timidity &&\
apt-get install -y freepats &&\
apt-get install -y libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev &&\
apt-get install -y alsa-base alsa-utils pulseaudio
# exposing default port for streamlit
EXPOSE 8501
# making directory of app
WORKDIR /streamlit-docker
# copy over requirements
COPY requirements.txt ./requirements.txt
RUN python3 -m pip install --upgrade pip setuptools wheel
# install pip then packages
RUN pip3 install -r requirements.txt
# copying all files over
COPY . .
# cmd to launch app when container is run
CMD streamlit run my_app.py
# streamlit-specific commands for config
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
RUN mkdir -p /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'