hindi-ocr-api / Dockerfile
Angstormy's picture
Upload Dockerfile with huggingface_hub
09d1d8c verified
raw
history blame contribute delete
755 Bytes
# Use Python 3.10 (Stable for Torch/Transformers)
FROM python:3.10-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PORT 7860
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
wget \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy the application files
COPY . .
# Expose the port HF Spaces uses
EXPOSE 7860
# Make the start script executable
RUN chmod +x start.sh
# Start the application using our custom script
CMD ["./start.sh"]