aarav-kushwaha commited on
Commit
43457a6
·
verified ·
1 Parent(s): 6f0f9a3

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # Set the working directory to /app
4
+ WORKDIR /app
5
+
6
+ # Copy the requirements and install them
7
+ COPY api_requirements.txt .
8
+ RUN pip install --no-cache-dir -r api_requirements.txt
9
+
10
+ # Copy the API app file
11
+ COPY api_app.py .
12
+
13
+ # Expose port 7860 which Hugging Face Spaces requires
14
+ EXPOSE 7860
15
+
16
+ # Start the FastAPI server using Uvicorn
17
+ CMD ["uvicorn", "api_app:app", "--host", "0.0.0.0", "--port", "7860"]