ryugaku-app / Dockerfile
lorinta's picture
Upload folder using huggingface_hub
00a5799 verified
Raw
History Blame Contribute Delete
741 Bytes
FROM pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime
WORKDIR /app
# System dependencies for EasyOCR / OpenCV
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
libgl1-mesa-glx \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Pre-download STT / OCR models so the Space starts faster
RUN python -c "from faster_whisper import WhisperModel; WhisperModel('small', device='cpu', compute_type='int8')"
RUN python -c "import easyocr; easyocr.Reader(['ja','en'], gpu=False)"
COPY . .
EXPOSE 7860
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
CMD ["python", "app.py"]