| |
| FROM python:3.11-slim |
|
|
| |
| WORKDIR /app |
|
|
| |
| ENV DEBIAN_FRONTEND=noninteractive |
|
|
| |
| ENV TRANSFORMERS_CACHE=/tmp/transformers_cache \ |
| HF_HOME=/tmp/hf_home \ |
| HF_DATASETS_CACHE=/tmp/hf_datasets_cache \ |
| HF_METRICS_CACHE=/tmp/hf_metrics_cache |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| git \ |
| curl \ |
| build-essential \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| COPY requirements.txt . |
| COPY app.py . |
|
|
| |
| RUN pip install --upgrade pip \ |
| && pip install --no-cache-dir -r requirements.txt |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|