Energy_grid_forcast / Dockerfile
MyEnny's picture
Update Dockerfile
c3b7038 verified
raw
history blame contribute delete
621 Bytes
FROM python:3.10-slim
# Set work directory
WORKDIR /app
COPY . .
# Set environment variable so Streamlit doesn't write to root
ENV STREAMLIT_HOME=/app/.streamlit
ENV HOME=/app
# Create the config directory manually
RUN mkdir -p /app/.streamlit
# (Optional) Add a config file to disable Streamlit telemetry and set other options
RUN echo "\
[server]\n\
headless = true\n\
port = 7860\n\
enableCORS = false\n\
\n\
" > /app/.streamlit/config.toml
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 7860
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]