NotRev commited on
Commit
b61c915
·
verified ·
1 Parent(s): 8db282a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -1,17 +1,22 @@
1
- FROM python:3.10-slim
 
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
- build-essential \
7
  curl \
8
  git \
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  COPY requirements.txt ./
12
- COPY src/ ./src/
 
13
 
14
- RUN pip3 install -r requirements.txt
 
15
 
16
  EXPOSE 8501
17
 
 
1
+ # Use a common, stable Python image used for ML deployments
2
+ FROM python:3.10
3
 
4
  WORKDIR /app
5
 
6
+ # The necessary build tools are usually included, but we'll ensure common libraries are present
7
  RUN apt-get update && apt-get install -y \
 
8
  curl \
9
  git \
10
+ libffi-dev \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Copy and install dependencies
14
  COPY requirements.txt ./
15
+ # We use --no-cache-dir to prevent disk space issues, and --force-reinstall to clear old broken installs
16
+ RUN pip3 install --no-cache-dir --force-reinstall -r requirements.txt
17
 
18
+ # Copy application source code
19
+ COPY src/ ./src/
20
 
21
  EXPOSE 8501
22