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