Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +0 -16
Dockerfile
CHANGED
|
@@ -1,27 +1,11 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
-
|
| 3 |
-
# Minimal OS deps for TF on CPU
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 curl ca-certificates \
|
| 5 |
&& rm -rf /var/lib/apt/lists/*
|
| 6 |
-
|
| 7 |
-
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 8 |
-
PYTHONUNBUFFERED=1 \
|
| 9 |
-
TF_CPP_MIN_LOG_LEVEL=2 \
|
| 10 |
-
MODEL_DIR=/app/bert_tf
|
| 11 |
-
|
| 12 |
WORKDIR /app
|
| 13 |
-
|
| 14 |
-
# Python deps
|
| 15 |
COPY requirements.txt /app/
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
-
|
| 18 |
-
# App + bootstrap
|
| 19 |
COPY app.py /app/
|
| 20 |
COPY start.sh /app/
|
| 21 |
RUN chmod +x /app/start.sh
|
| 22 |
-
|
| 23 |
-
# If you later decide to commit weights, put them under /app/bert_tf/ and COPY here.
|
| 24 |
-
# For free-tier friendliness we download at startup instead.
|
| 25 |
-
|
| 26 |
EXPOSE 7860
|
| 27 |
CMD ["/app/start.sh"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
|
|
|
|
|
|
| 2 |
RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 curl ca-certificates \
|
| 3 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
WORKDIR /app
|
|
|
|
|
|
|
| 5 |
COPY requirements.txt /app/
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
| 7 |
COPY app.py /app/
|
| 8 |
COPY start.sh /app/
|
| 9 |
RUN chmod +x /app/start.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
EXPOSE 7860
|
| 11 |
CMD ["/app/start.sh"]
|