negi2725 commited on
Commit
280d799
·
1 Parent(s): dbbebbe

Create Dockerfile

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