Created
March 14, 2020 21:58
-
-
Save collinprather/f3e5a4e8b65df4a706d80d1989fe8716 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# exposing default port for streamlit | |
EXPOSE 8501 | |
# making directory of app | |
WORKDIR /streamlit-docker | |
# copy over requirements | |
COPY requirements.txt ./requirements.txt | |
# 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 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' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment