Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +22 -0
Dockerfile
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.12-slim
|
2 |
+
|
3 |
+
# Install system dependencies
|
4 |
+
RUN apt-get update && apt-get install -y git
|
5 |
+
|
6 |
+
# Set working directory
|
7 |
+
WORKDIR /code
|
8 |
+
|
9 |
+
# Copy requirements
|
10 |
+
COPY requirements.txt .
|
11 |
+
|
12 |
+
# Install Python dependencies
|
13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
14 |
+
|
15 |
+
# Copy the rest of the app
|
16 |
+
COPY . .
|
17 |
+
|
18 |
+
# Expose port 7860
|
19 |
+
EXPOSE 7860
|
20 |
+
|
21 |
+
# Run the FastAPI app
|
22 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|