Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM python:3.10
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
@@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y \
|
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
# Pre-download model (IMPORTANT
|
| 16 |
RUN python -c "from transformers import AutoTokenizer, AutoModelForCausalLM; \
|
| 17 |
AutoTokenizer.from_pretrained('distilgpt2'); \
|
| 18 |
AutoModelForCausalLM.from_pretrained('distilgpt2')"
|
|
@@ -22,4 +22,4 @@ COPY app.py .
|
|
| 22 |
|
| 23 |
EXPOSE 7860
|
| 24 |
|
| 25 |
-
CMD ["
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
+
# Pre-download model (IMPORTANT)
|
| 16 |
RUN python -c "from transformers import AutoTokenizer, AutoModelForCausalLM; \
|
| 17 |
AutoTokenizer.from_pretrained('distilgpt2'); \
|
| 18 |
AutoModelForCausalLM.from_pretrained('distilgpt2')"
|
|
|
|
| 22 |
|
| 23 |
EXPOSE 7860
|
| 24 |
|
| 25 |
+
CMD ["python", "app.py"]
|