Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
|
@@ -4,12 +4,11 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
| 4 |
PYTHONUNBUFFERED=1 \
|
| 5 |
HF_HOME=/root/.cache/huggingface \
|
| 6 |
TRANSFORMERS_CACHE=/root/.cache/huggingface/transformers \
|
| 7 |
-
HF_HUB_ENABLE_HF_TRANSFER=1 \
|
| 8 |
PIP_NO_CACHE_DIR=1
|
| 9 |
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
-
# Minimal OS deps
|
| 13 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 14 |
git git-lfs \
|
| 15 |
&& rm -rf /var/lib/apt/lists/* \
|
|
@@ -19,7 +18,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 19 |
COPY requirements.txt .
|
| 20 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
-
# Warm caches
|
| 23 |
RUN python - <<'PY'
|
| 24 |
import nltk
|
| 25 |
nltk.download('punkt'); nltk.download('averaged_perceptron_tagger')
|
|
@@ -36,3 +35,4 @@ RUN mkdir -p /app/data
|
|
| 36 |
EXPOSE 7860
|
| 37 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 38 |
|
|
|
|
|
|
| 4 |
PYTHONUNBUFFERED=1 \
|
| 5 |
HF_HOME=/root/.cache/huggingface \
|
| 6 |
TRANSFORMERS_CACHE=/root/.cache/huggingface/transformers \
|
|
|
|
| 7 |
PIP_NO_CACHE_DIR=1
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
+
# Minimal OS deps
|
| 12 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 13 |
git git-lfs \
|
| 14 |
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
| 18 |
COPY requirements.txt .
|
| 19 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
+
# Warm caches (NLTK + BLIP)
|
| 22 |
RUN python - <<'PY'
|
| 23 |
import nltk
|
| 24 |
nltk.download('punkt'); nltk.download('averaged_perceptron_tagger')
|
|
|
|
| 35 |
EXPOSE 7860
|
| 36 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 37 |
|
| 38 |
+
|