Spaces:
Runtime error
Runtime error
Download Dockerfile from Kashtan/Detect_Edits_in_AI-Generated_Text: direct link, hf CLI and curl.
- Browser
- Download file 663 Bytes
-
https://huggingface.co/spaces/Kashtan/Detect_Edits_in_AI-Generated_Text/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Kashtan/Detect_Edits_in_AI-Generated_Text/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Kashtan/Detect_Edits_in_AI-Generated_Text/resolve/main/Dockerfile
663 Bytes
| # Use an official Python runtime | |
| FROM python:3.9-slim | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy the requirements file | |
| COPY requirements.txt . | |
| # Change permission | |
| RUN mkdir -p /cache/huggingface /cache/matplotlib \ | |
| && chmod -R 777 /cache/huggingface /cache/matplotlib | |
| # Set environment variables for Hugging Face and Matplotlib | |
| ENV HF_HOME=/cache/huggingface | |
| ENV MPLCONFIGDIR=/cache/matplotlib | |
| # Flask | |
| ENV FLASK_APP=app.py | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the app | |
| COPY . . | |
| # Expose the Flask port | |
| EXPOSE 5000 | |
| # Run the application | |
| CMD ["flask", "run", "--host=0.0.0.0", "--port=5000"] |