Spaces:
Runtime error
Runtime error
ShreyMehra commited on
Update Dockerfile
Browse files1234567891011121314151617181920212223# Use the official lightweight Python image.# https://hub.docker.com/_/pythonFROM python:3.7# Allow statements and log messages to immediately appear in the Knative logsENV PYTHONUNBUFFERED TrueEXPOSE 8080# Copy local code to the container image.ENV APP_HOME /appWORKDIR $APP_HOMECOPY . ./# Install production dependencies.RUN pip install -r requirements.txt# Run the web service on container startup. Here we use the gunicorn# webserver, with one worker process and 8 threads.# For environments with multiple CPU cores, increase the number of workers# to be equal to the cores available.# Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.CMD streamlit run --server.port 8080 --server.enableCORS false app.py123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960# # Use the official lightweight Python image.# # https://hub.docker.com/_/python# FROM python:3.7# # Allow statements and log messages to immediately appear in the Knative logs# ENV PYTHONUNBUFFERED True# EXPOSE 8080# # Copy local code to the container image.# ENV APP_HOME /app# WORKDIR $APP_HOME# COPY . ./# # Install production dependencies.# RUN pip install -r requirements.txt# # Run the web service on container startup. Here we use the gunicorn# # webserver, with one worker process and 8 threads.# # For environments with multiple CPU cores, increase the number of workers# # to be equal to the cores available.# # Timeout is set to 0 to disable the timeouts of the workers to allow Cloud Run to handle instance scaling.# CMD streamlit run --server.port 8080 --server.enableCORS false app.pyFROM python:3.7RUN pip install virtualenvENV VIRTUAL_ENV=/venvRUN virtualenv venv -p python3ENV PATH="VIRTUAL_ENV/bin:$PATH"WORKDIR /appADD . /app# Install dependenciesRUN pip install -r requirements.txt# copying all files overCOPY . /app# Expose portENV PORT 8501# cmd to launch app when container is runCMD streamlit run app.py# streamlit-specific commands for configENV LC_ALL=C.UTF-8ENV LANG=C.UTF-8RUN mkdir -p /root/.streamlitRUN 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'
Dockerfile+54-17