Download Dockerfile from mrmayankmathurorg/Customer-EMAIL-Agent: direct link, hf CLI and curl.
- Browser
- Download file 1 kB
-
https://huggingface.co/spaces/mrmayankmathurorg/Customer-EMAIL-Agent/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/mrmayankmathurorg/Customer-EMAIL-Agent/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/mrmayankmathurorg/Customer-EMAIL-Agent/resolve/main/Dockerfile
1 kB
| # Use an official Python runtime as a parent image | |
| FROM python:3.11-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE 1 | |
| ENV PYTHONUNBUFFERED 1 | |
| ENV PORT 7860 | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy the requirements file into the container | |
| COPY requirements.txt . | |
| # Install any needed packages specified in requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application code into the container | |
| COPY . . | |
| # Create a non-root user and switch to it for better security on HF | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Make sure the static directory exists | |
| RUN mkdir -p /app/static | |
| # Expose the port the app runs on | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "7860"] | |