GL-MLOps-VisitWithUs / Dockerfile
SandeepMM's picture
Upload folder using huggingface_hub
983d2e9 verified
raw
history blame contribute delete
719 Bytes
# Use a minimal base image with Python 3.9 installed
FROM python:3.9
# Set the working directory inside the container to /app
WORKDIR /app
# Copy all deployment files (Dockerfile, app.py, requirements.txt)
# from the build context (repo root) to the container's /app directory
COPY . .
# Install Python dependencies listed in requirements.txt
RUN pip3 install -r requirements.txt
# Create the non-root user and switch to it for security
RUN useradd -m -u 1000 user
USER user
ENV PATH=/home/user/.local/bin:$PATH
# IMPORTANT: Ensure the CMD runs the app.py file located in the /app WORKDIR
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]