Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +9 -12
Dockerfile
CHANGED
@@ -1,23 +1,20 @@
|
|
1 |
-
# Use an official Python image
|
2 |
FROM python:3.10
|
3 |
|
4 |
-
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Copy the requirements file
|
8 |
-
COPY requirements.txt
|
9 |
|
10 |
# Install dependencies
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
-
# Copy all
|
14 |
COPY . .
|
15 |
|
16 |
-
#
|
17 |
-
|
18 |
|
19 |
-
#
|
20 |
-
|
21 |
-
|
22 |
-
# Run the app using the startup script
|
23 |
-
CMD ["./start0.sh"]
|
|
|
1 |
+
# Use an official lightweight Python image
|
2 |
FROM python:3.10
|
3 |
|
4 |
+
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Copy the requirements file
|
8 |
+
COPY requirements.txt .
|
9 |
|
10 |
# Install dependencies
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
+
# Copy all application files
|
14 |
COPY . .
|
15 |
|
16 |
+
# Expose the required port for Hugging Face (7860)
|
17 |
+
EXPOSE 7860
|
18 |
|
19 |
+
# Run FastAPI using Uvicorn
|
20 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|