Yousuf-Islam commited on
Commit
d2b9989
·
verified ·
1 Parent(s): acf5a33

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.9 as the base image
2
+ FROM python:3.9
3
+
4
+ # Set the working directory
5
+ WORKDIR /code
6
+
7
+ # Copy the requirements file
8
+ COPY ./requirements.txt /code/requirements.txt
9
+
10
+ # Install the dependencies
11
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
12
+
13
+ # Copy the rest of the application code
14
+ COPY . .
15
+
16
+ # Start the FastAPI server on port 7860 (Required by HF Spaces)
17
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]