DocumentInteractor / Dockerfile
Uzaiir's picture
Update Dockerfile
c11a592 verified
# Use official Python base image
FROM python:3.10-slim
# Set workdir to /src
WORKDIR /src
# Copy requirements and install dependencies
COPY requirements.txt /src/
RUN pip install --no-cache-dir -r requirements.txt
# Create the .streamlit config directory and copy config.toml
RUN mkdir -p /root/.streamlit
COPY .streamlit/config.toml /root/.streamlit/config.toml
# Copy entire src directory contents into container
COPY src/ /src/
# Expose streamlit port
EXPOSE 8501
# Command to run your app
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
# # Use an official Python image
# FROM python:3.10
# # Set the working directory
# WORKDIR /app
# # Copy all files to the container
# COPY . /app
# # Install dependencies
# RUN pip install --no-cache-dir -r requirements.txt
# # Create the .streamlit config directory and copy config.toml
# RUN mkdir -p /root/.streamlit
# COPY .streamlit/config.toml /root/.streamlit/config.toml
# # Expose port 8501 for Streamlit
# EXPOSE 8501
# # Run the Streamlit app from the src folder
# CMD ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"]