Spaces:
Runtime error
Runtime error
chore: update
Browse files- Dockerfile +2 -5
Dockerfile
CHANGED
|
@@ -1,9 +1,6 @@
|
|
| 1 |
# Use official Python 3.12 base image
|
| 2 |
FROM python:3.12
|
| 3 |
|
| 4 |
-
# Create /models directory and set ownership before switching user
|
| 5 |
-
RUN mkdir -p /models && chown 1000:1000 /models
|
| 6 |
-
|
| 7 |
# Create a non-root user and switch to it
|
| 8 |
RUN useradd -m -u 1000 user
|
| 9 |
USER user
|
|
@@ -33,8 +30,8 @@ COPY --chown=user . .
|
|
| 33 |
EXPOSE 7860
|
| 34 |
|
| 35 |
# Download the model files (now that /models is writable)
|
| 36 |
-
RUN curl https://s3.tebi.io/models/model.pkl -o /models/model.pkl && \
|
| 37 |
-
curl https://s3.tebi.io/models/tokenizer.pkl -o /models/tokenizer.pkl
|
| 38 |
|
| 39 |
# Run your app
|
| 40 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
# Use official Python 3.12 base image
|
| 2 |
FROM python:3.12
|
| 3 |
|
|
|
|
|
|
|
|
|
|
| 4 |
# Create a non-root user and switch to it
|
| 5 |
RUN useradd -m -u 1000 user
|
| 6 |
USER user
|
|
|
|
| 30 |
EXPOSE 7860
|
| 31 |
|
| 32 |
# Download the model files (now that /models is writable)
|
| 33 |
+
RUN mkdir -p /app/models && curl https://s3.tebi.io/models/model.pkl -o /app/models/model.pkl && \
|
| 34 |
+
curl https://s3.tebi.io/models/tokenizer.pkl -o /app/models/tokenizer.pkl
|
| 35 |
|
| 36 |
# Run your app
|
| 37 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|