Dockerfile 525 Bytes
Newer Older
Arman Khalatyan's avatar
Arman Khalatyan committed
1
2
# base image
FROM python:3.7
Arman Khalatyan's avatar
Arman Khalatyan committed
3
USER root
Arman Khalatyan's avatar
Arman Khalatyan committed
4
5
# streamlit-specific commands
RUN mkdir -p /root/.streamlit
Arman Khalatyan's avatar
Arman Khalatyan committed
6
7
8
9
10
11
12
13
14
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'

Arman Khalatyan's avatar
Arman Khalatyan committed
15
16
17
18
19
20
21
22
# exposing default port for streamlit
EXPOSE 8501

# copy over and install packages
COPY requirements.txt ./requirements.txt
RUN pip3 install -r requirements.txt

# copying everything over
Arman Khalatyan's avatar
Arman Khalatyan committed
23
24
COPY . .

Arman Khalatyan's avatar
Arman Khalatyan committed
25
26
# run app
CMD streamlit run webapp/app.py