Spaces:
Sleeping
Sleeping
Commit
·
96fb3c2
1
Parent(s):
8f9ede9
Update Dockerfile
Browse files- Dockerfile +12 -12
Dockerfile
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
-
# Use the official Python base image
|
2 |
-
FROM python:3.9
|
3 |
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
|
8 |
# Copy the requirements file into the container
|
9 |
-
COPY
|
10 |
-
|
11 |
|
12 |
-
# Install
|
13 |
-
RUN pip install -r requirements.txt
|
14 |
|
15 |
-
# Copy the
|
16 |
-
COPY
|
17 |
|
|
|
|
|
18 |
|
19 |
-
# Expose the port that
|
20 |
EXPOSE 7860
|
21 |
|
22 |
-
#
|
23 |
-
CMD ["uvicorn", "
|
|
|
1 |
+
# Use the official Python image as the base image
|
2 |
+
FROM python:3.9
|
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 LR_pipeline.joblib files to the container
|
14 |
+
COPY pickle .
|
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"]
|