Upload folder using huggingface_hub
Browse files- Dockerfile +11 -17
Dockerfile
CHANGED
|
@@ -1,27 +1,21 @@
|
|
| 1 |
# Use a lightweight Python image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
ENV PYTHONDONTWRITEBYTECODE=1
|
| 6 |
-
ENV PYTHONUNBUFFERED=1
|
| 7 |
-
|
| 8 |
-
# Set working directory
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
# Copy
|
| 12 |
-
COPY .
|
| 13 |
|
| 14 |
-
#
|
| 15 |
RUN pip install --upgrade pip \
|
| 16 |
-
&& pip install -r
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
| 23 |
-
ENV STREAMLIT_SERVER_PORT=7860
|
| 24 |
-
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
| 25 |
|
| 26 |
-
#
|
| 27 |
-
CMD ["streamlit", "run", "
|
|
|
|
| 1 |
# Use a lightweight Python image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
+
# Set working directory inside the container
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
# Expose the default Hugging Face Space port
|
| 18 |
+
EXPOSE 7860
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
# Run Streamlit app
|
| 21 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|