songhieng commited on
Commit
dabfb06
·
verified ·
1 Parent(s): 480b8e3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -20
Dockerfile CHANGED
@@ -1,20 +1,26 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.9-slim
3
-
4
- # Set the working directory in the container
5
- WORKDIR /app
6
-
7
- # Copy the requirements file into the container at /app
8
- COPY requirements.txt /app/requirements.txt
9
-
10
- # Install any needed packages specified in requirements.txt
11
- RUN pip install --no-cache-dir -r /app/requirements.txt
12
-
13
- # Copy the rest of the application code to /app
14
- COPY . /app
15
-
16
- # Expose port 8000 to the outside world
17
- EXPOSE 8000
18
-
19
- # Command to run the FastAPI application using Uvicorn
20
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies needed for building some Python packages
8
+ RUN apt-get update && apt-get install -y \
9
+ cmake \
10
+ build-essential \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Copy the requirements file into the container at /app
14
+ COPY requirements.txt /app/requirements.txt
15
+
16
+ # Install any needed packages specified in requirements.txt
17
+ RUN pip install --no-cache-dir -r /app/requirements.txt
18
+
19
+ # Copy the rest of the application code to /app
20
+ COPY . /app
21
+
22
+ # Expose port 8000 to the outside world
23
+ EXPOSE 8000
24
+
25
+ # Command to run the FastAPI application using Uvicorn
26
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]