Archisman Karmakar commited on
Commit
08ce33a
·
1 Parent(s): fdb492d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -6
Dockerfile CHANGED
@@ -1,10 +1,14 @@
1
  # Use a slim Python 3.12 image
2
  FROM python:3.12-slim
3
 
4
- # Install any system dependencies (adjust as needed)
5
- RUN apt-get update && apt-get install -y --no-install-recommends \
6
- build-essential \
7
- && rm -rf /var/lib/apt/lists/*
 
 
 
 
8
 
9
  # Set the working directory
10
  WORKDIR /app
@@ -12,10 +16,10 @@ WORKDIR /app
12
  # Copy dependency files
13
  COPY requirements.txt .
14
 
15
- # Upgrade pip and install dependencies
16
  RUN pip install --upgrade pip && pip install -r requirements.txt
17
 
18
- # Copy the rest of the app's code
19
  COPY . .
20
 
21
  # Expose the port Streamlit uses
 
1
  # Use a slim Python 3.12 image
2
  FROM python:3.12-slim
3
 
4
+ # Copy your packages.txt file into the container
5
+ COPY packages.txt .
6
+
7
+ # Update package lists, upgrade installed packages, then install system dependencies
8
+ RUN apt-get update && \
9
+ apt-get upgrade -y && \
10
+ xargs -a packages.txt apt-get install -y --no-install-recommends && \
11
+ rm -rf /var/lib/apt/lists/*
12
 
13
  # Set the working directory
14
  WORKDIR /app
 
16
  # Copy dependency files
17
  COPY requirements.txt .
18
 
19
+ # Upgrade pip and install Python dependencies
20
  RUN pip install --upgrade pip && pip install -r requirements.txt
21
 
22
+ # Copy the rest of your app's code
23
  COPY . .
24
 
25
  # Expose the port Streamlit uses