navpan2 commited on
Commit
9efb5b8
·
verified ·
1 Parent(s): 6f556e4

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python image as a base
2
+ FROM python:3.8
3
+
4
+ # Set the working directory
5
+ WORKDIR /app
6
+
7
+ # Install the required packages
8
+ RUN pip install fastapi uvicorn requests python-multipart
9
+
10
+ # Copy the FastAPI application code into the container
11
+ COPY . .
12
+
13
+ # Expose the required port for FastAPI (you may choose any available port, e.g., 7860 for compatibility with Hugging Face Spaces)
14
+ EXPOSE 7860
15
+
16
+ # Run the FastAPI application with uvicorn
17
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]