Download Dockerfile from rizzdeep/Summiz: direct link, hf CLI and curl.
- Browser
- Download file 861 Bytes
-
https://huggingface.co/spaces/rizzdeep/Summiz/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/rizzdeep/Summiz/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/rizzdeep/Summiz/resolve/main/Dockerfile
861 Bytes
| # Base image | |
| FROM python:3.11-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| tesseract-ocr \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set workdir | |
| WORKDIR /app | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| RUN mkdir -p /app/model/t5-base && \ | |
| python -c "from transformers import AutoModelForSeq2SeqLM, AutoTokenizer; \ | |
| model = AutoModelForSeq2SeqLM.from_pretrained('t5-base'); \ | |
| model.save_pretrained('/app/model/t5-base'); \ | |
| tokenizer = AutoTokenizer.from_pretrained('t5-base'); \ | |
| tokenizer.save_pretrained('/app/model/t5-base')" | |
| # Copy app code | |
| COPY app/ . | |
| # Expose Space default port | |
| EXPOSE 7860 | |
| # Run app | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |