Download Dockerfile from morgankavanagh/post_editing_evaluator: direct link, hf CLI and curl.
- Browser
- Download file 836 Bytes
-
https://huggingface.co/spaces/morgankavanagh/post_editing_evaluator/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/morgankavanagh/post_editing_evaluator/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/morgankavanagh/post_editing_evaluator/resolve/main/Dockerfile
836 Bytes
| # Use a lightweight Python base image | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Create and set permissions for COMET cache directory | |
| RUN mkdir -p /tmp && chmod 777 /tmp | |
| # Copy the project files | |
| COPY . . | |
| # Install system dependencies (optional – useful for some Python packages) | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| RUN pip install --upgrade pip | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| RUN pip install --no-cache-dir unbabel-comet | |
| # Environment variables | |
| ENV COMET_CACHE="/tmp" | |
| # Expose port for Gradio | |
| EXPOSE 7860 | |
| # Set environment variables | |
| ENV OPENAI_API_KEY=${OPENAI_API_KEY} | |
| ENV HF_API_TOKEN=${HF_API_TOKEN} | |
| ENV COMET_CACHE="/tmp" | |
| # Run the Gradio interface | |
| CMD ["python", "interface.py"] |