File size: 711 Bytes
cbd0eab 17d6c7f cbd0eab 17d6c7f cbd0eab 17d6c7f cbd0eab 17d6c7f cbd0eab 17d6c7f cbd0eab 17d6c7f cbd0eab |
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 |
# Use a minimal base image with Python 3.9 installed
FROM python:3.9-slim
# Set environment variables to prevent interactive prompts
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set the working directory inside the container to /app
WORKDIR /app
# Copy all files (including apiroute.env) into the container
COPY . .
# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt
# Install dotenv to read .env files inside app.py
RUN pip3 install python-dotenv
# Expose the port Streamlit uses
EXPOSE 8501
# Define the command to run the Streamlit app
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
|