ocr / Dockerfile
longjava2024's picture
Update Dockerfile
5f4a0df verified
raw
history blame
620 Bytes
FROM python:3.10-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
HF_HUB_DISABLE_SYMLINKS_WARNING=1
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir \
"torch==2.3.0" \
torchvision \
fastapi \
uvicorn[standard] \
"huggingface-hub>=0.23.2" \
"transformers==4.44.2" \
accelerate \
pillow \
requests
COPY app.py /app/app.py
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]