Upload folder using huggingface_hub
Browse files- Dockerfile +7 -9
Dockerfile
CHANGED
|
@@ -1,21 +1,19 @@
|
|
| 1 |
-
#
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy requirements into the image
|
| 8 |
COPY requirements.txt .
|
| 9 |
|
| 10 |
-
# Install dependencies
|
| 11 |
RUN pip install --upgrade pip \
|
| 12 |
-
&& pip install -r requirements.txt
|
| 13 |
|
| 14 |
-
# Copy the rest of the app code
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
-
|
| 18 |
EXPOSE 7860
|
| 19 |
|
| 20 |
-
|
| 21 |
-
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
# Lightweight Python base image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
+
ENV PYTHONUNBUFFERED=1 \
|
| 5 |
+
HF_HUB_DISABLE_TELEMETRY=1
|
| 6 |
+
|
| 7 |
WORKDIR /app
|
| 8 |
|
|
|
|
| 9 |
COPY requirements.txt .
|
| 10 |
|
|
|
|
| 11 |
RUN pip install --upgrade pip \
|
| 12 |
+
&& pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
|
|
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
+
ENV PORT=7860
|
| 17 |
EXPOSE 7860
|
| 18 |
|
| 19 |
+
CMD ["bash", "-c", "streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 --server.headless=true"]
|
|
|