Spaces:
No application file
No application file
Download Dockerfile from longjava2024/ocr: direct link, hf CLI and curl.
- Browser
- Download file 687 Bytes
-
https://huggingface.co/spaces/longjava2024/ocr/resolve/c67c2e9cf52fa4cc326dcd044c64abb4f3bc77b3/Dockerfile
- Command line
-
hf download hf://spaces/longjava2024/ocr@c67c2e9cf52fa4cc326dcd044c64abb4f3bc77b3/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/longjava2024/ocr/resolve/c67c2e9cf52fa4cc326dcd044c64abb4f3bc77b3/Dockerfile
687 Bytes
| FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime | |
| 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 \ | |
| fastapi \ | |
| uvicorn[standard] \ | |
| "huggingface-hub>=0.23.2" \ | |
| "transformers==4.44.2" \ | |
| accelerate \ | |
| bitsandbytes \ | |
| torchvision \ | |
| pillow \ | |
| requests \ | |
| flash-attn --no-build-isolation | |
| COPY app.py /app/app.py | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |