Download Dockerfile from Praneeth4040/FreeFire-Image-Separator: direct link, hf CLI and curl.
- Browser
- Download file 905 Bytes
-
https://huggingface.co/spaces/Praneeth4040/FreeFire-Image-Separator/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Praneeth4040/FreeFire-Image-Separator/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Praneeth4040/FreeFire-Image-Separator/resolve/main/Dockerfile
905 Bytes
| # Use an official Python runtime as a parent image | |
| FROM python:3.10-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Install system dependencies required for OpenCV and EasyOCR | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set the working directory in the container | |
| WORKDIR /app | |
| # 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 current directory contents into the container at /app | |
| COPY . . | |
| # Create directories for uploads | |
| RUN mkdir -p api_uploads | |
| # Hugging Face Spaces typically uses port 7860 | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |