File size: 1,176 Bytes
bcd771c
 
2503901
bcd771c
 
 
 
 
 
 
 
 
 
 
d735292
bcd771c
 
 
 
 
2503901
d735292
 
 
 
bcd771c
 
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
FROM lucone83/streamlit-nginx:python3.9


COPY ./ ./
COPY ./pages ./pages

# # using venv
RUN python3 -m venv /home/streamlitapp/venv
# RUN . /home/streamlitapp/venv/bin/activate
ENV VIRTUAL_ENV /home/streamlitapp/venv                     # activating environment
ENV PATH /home/streamlitapp/venv/bin:$PATH                  # activating environment

RUN /usr/local/bin/python -m pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip install streamlit==1.27.2

# ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

COPY --chown=streamlitapp ./nginx.conf /home/streamlitapp/.nginx/nginx.conf

EXPOSE 8080

# CMD streamlit run home.py    --server.headless true    --server.enableCORS false    --server.enableXsrfProtection false    --server.fileWatcherType none
CMD ["streamlit", "run", "home.py", "--server.headless", "true", "--server.enableCORS", "false", "--server.enableXsrfProtection", "false", "--server.fileWatcherType", "none"]
# CMD [ "streamlit", "run", "home.py"]
# CMD /bin/bash -c "source /home/streamlitapp/venv/bin/activate && streamlit run home.py"
# CMD ["/bin/bash", "-c", "source /home/streamlitapp/venv/bin/activate && streamlit run home.py"]