Download Dockerfile from WebashalarForML/Scratch_Vision_Game_v1: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/spaces/WebashalarForML/Scratch_Vision_Game_v1/resolve/4fa11e6ce30dcec85f2194d6f3fb0e5ed5b70442/Dockerfile
- Command line
-
hf download hf://spaces/WebashalarForML/Scratch_Vision_Game_v1@4fa11e6ce30dcec85f2194d6f3fb0e5ed5b70442/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/WebashalarForML/Scratch_Vision_Game_v1/resolve/4fa11e6ce30dcec85f2194d6f3fb0e5ed5b70442/Dockerfile
1.31 kB
| # Base image with Python and common dependencies | |
| FROM python:3.10-slim | |
| WORKDIR /app | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PYTHONUNBUFFERED=1 \ | |
| PYTHONDONTWRITEBYTECODE=1 \ | |
| TRANSFORMERS_CACHE=/app/cache \ | |
| HF_HOME=/app/cache \ | |
| NLTK_DATA=/app/nltk_data \ | |
| MPLCONFIGDIR=/app/.config/matplotlib | |
| COPY requirements.txt requirements.txt | |
| COPY extract_img_pdf.py extract_img_pdf.py | |
| COPY live_streaming_flask.py live_streaming_flask.py | |
| COPY templates/ /app/templates | |
| COPY reference/ /app/reference | |
| COPY .env .env | |
| COPY test_streaming.py test_streaming.py | |
| COPY app_main.py app_main.py | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| tesseract-ocr \ | |
| poppler-utils \ | |
| libgl1 \ | |
| ffmpeg \ | |
| libopencv-dev \ | |
| curl \ | |
| ca-certificates \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | |
| # Create writable paths | |
| RUN mkdir -p /app/nltk_data /app/.config/matplotlib \ | |
| && mkdir -p /app/cache /app/data /app/OUTPUTS /app/outputs \ | |
| && mkdir -p /app/outputs/DETECTED_IMAGE /app/outputs/SCANNED_IMAGE /app/outputs/EXTRACTED_JSON \ | |
| && chmod -R 777 /app | |
| EXPOSE 7860 | |
| CMD ["python", "app_main.py"] | |