hf-repo-info / Dockerfile
hahunavth's picture
upd docker file to hf
d735292
raw history blame
No virus
1.18 kB
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"]