Sonny4Sonnix commited on
Commit
c1940e9
·
1 Parent(s): 40ea8f6

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ FROM python:3.10.6
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements file into the container
8
+ COPY requirements.txt .
9
+
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Copy the xgb_model.joblib files to the container
14
+ COPY xgb_model.joblib .
15
+
16
+ # Copy the current directory contents into the container at /app
17
+ COPY . /app
18
+
19
+ # Expose the port that the FastAPI application will run on
20
+ EXPOSE 7860
21
+
22
+ # Command to run the FastAPI application when the container starts
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]