Do0rMaMu commited on
Commit
711e1cc
·
verified ·
1 Parent(s): 70bd2d5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -4
Dockerfile CHANGED
@@ -4,16 +4,23 @@ FROM python:3.10-slim
4
  # Set the working directory in the container
5
  WORKDIR /code
6
 
 
 
 
 
 
 
 
 
 
7
  # Copy the current directory contents into the container at /usr/src/app
8
  COPY . .
9
 
10
- COPY ./requirements.txt /code/requirements.txt
11
-
12
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
13
 
14
  # Make port 8000 available to the world outside this container
15
  EXPOSE 8000
16
 
17
-
18
  # Run app.py when the container launches
19
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
 
4
  # Set the working directory in the container
5
  WORKDIR /code
6
 
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ gcc \
10
+ libc-dev \
11
+ libmysqlclient-dev \
12
+ default-libmysqlclient-dev \
13
+ pkg-config \
14
+ && apt-get clean
15
+
16
  # Copy the current directory contents into the container at /usr/src/app
17
  COPY . .
18
 
19
+ # Install any needed packages specified in requirements.txt
20
+ RUN pip install -r requirements.txt
 
21
 
22
  # Make port 8000 available to the world outside this container
23
  EXPOSE 8000
24
 
 
25
  # Run app.py when the container launches
26
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]