Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +11 -9
Dockerfile
CHANGED
@@ -3,19 +3,21 @@ FROM python:3.10-slim
|
|
3 |
# Set working directory
|
4 |
WORKDIR /app
|
5 |
|
6 |
-
# Copy application files
|
7 |
-
COPY . /app
|
8 |
-
|
9 |
# Install system dependencies
|
10 |
RUN apt-get update && apt-get install -y \
|
11 |
-
|
12 |
-
|
13 |
&& rm -rf /var/lib/apt/lists/*
|
14 |
|
15 |
-
#
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
|
|
|
18 |
EXPOSE 7860
|
19 |
|
20 |
-
#
|
21 |
-
CMD ["
|
|
|
3 |
# Set working directory
|
4 |
WORKDIR /app
|
5 |
|
|
|
|
|
|
|
6 |
# Install system dependencies
|
7 |
RUN apt-get update && apt-get install -y \
|
8 |
+
build-essential \
|
9 |
+
libpq-dev \
|
10 |
&& rm -rf /var/lib/apt/lists/*
|
11 |
|
12 |
+
# Copy the current directory contents into the container at /app
|
13 |
+
COPY . /app
|
14 |
+
|
15 |
+
# Install the required Python packages
|
16 |
+
RUN pip install --upgrade pip
|
17 |
+
RUN pip install -r requirements.txt
|
18 |
|
19 |
+
# Expose the port Hugging Face Spaces expects
|
20 |
EXPOSE 7860
|
21 |
|
22 |
+
# Command to run the FastAPI app on Hugging Face Spaces
|
23 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|