HerbertAIHug commited on
Commit
96fb3c2
·
1 Parent(s): 8f9ede9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -12
Dockerfile CHANGED
@@ -1,23 +1,23 @@
1
- # Use the official Python base image for FastAPI
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 ./requirements.txt /app
10
-
11
 
12
- # Install any needed packages specified in requirements.txt
13
- RUN pip install -r requirements.txt
14
 
15
- # Copy the entire src directory into the container
16
- COPY ./src /app/src
17
 
 
 
18
 
19
- # Expose the port that your FastAPI application will run on (default is 7860)
20
  EXPOSE 7860
21
 
22
- # Define the command to run your FastAPI application
23
- CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--reload"]
 
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"]