Spaces:
Running
Running
Download Dockerfile from DarkMo0o/Translation: direct link, hf CLI and curl.
- Browser
- Download file 747 Bytes
-
https://huggingface.co/spaces/DarkMo0o/Translation/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/DarkMo0o/Translation/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/DarkMo0o/Translation/resolve/main/Dockerfile
747 Bytes
| # Use an official Python runtime as a parent image | |
| FROM python:3.11-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Set the working directory | |
| WORKDIR /workspace | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first (to leverage Docker caching) | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the application files | |
| COPY . . | |
| # Expose port 7860 (port used by Hugging Face Spaces) | |
| EXPOSE 7860 | |
| # Start the server using uvicorn and the ASGI wrapper | |
| CMD ["python", "app.py"] | |