Spaces:
Sleeping
Sleeping
Download Dockerfile from SandeepMM/GL-MLOps-VisitWithUs: direct link, hf CLI and curl.
- Browser
- Download file 719 Bytes
-
https://huggingface.co/spaces/SandeepMM/GL-MLOps-VisitWithUs/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/SandeepMM/GL-MLOps-VisitWithUs/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/SandeepMM/GL-MLOps-VisitWithUs/resolve/main/Dockerfile
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"] | |