Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +4 -5
Dockerfile
CHANGED
|
@@ -15,16 +15,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 15 |
# Copy requirements first (to leverage Docker caching)
|
| 16 |
COPY requirements.txt .
|
| 17 |
|
| 18 |
-
#
|
| 19 |
RUN pip install --no-cache-dir --upgrade pip \
|
| 20 |
&& pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
# Copy the rest of the application files
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
-
# Expose port (
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
-
# Start the server
|
| 29 |
-
|
| 30 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 15 |
# Copy requirements first (to leverage Docker caching)
|
| 16 |
COPY requirements.txt .
|
| 17 |
|
| 18 |
+
# Install Python dependencies
|
| 19 |
RUN pip install --no-cache-dir --upgrade pip \
|
| 20 |
&& pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
# Copy the rest of the application files
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
+
# Expose port 7860 (port used by Hugging Face Spaces)
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
+
# Start the server using uvicorn and the ASGI wrapper
|
| 29 |
+
CMD ["uvicorn", "app:asgi_app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|