willco-afk commited on
Commit
396d097
·
verified ·
1 Parent(s): 8bf06b4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -4
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # Use the official Python image
2
  FROM python:3.10-slim
3
 
4
  # Set working directory in the container
@@ -11,14 +11,20 @@ RUN apt-get update && apt-get install -y \
11
  libxrender-dev \
12
  && rm -rf /var/lib/apt/lists/*
13
 
 
 
 
14
  # Copy requirements.txt to the container
15
  COPY requirements.txt .
16
 
17
- # Install the dependencies from requirements.txt
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
- # Copy the rest of the application code
 
 
 
21
  COPY . .
22
 
23
- # Command to run the app
24
  CMD ["streamlit", "run", "app.py"]
 
1
+ # Use the official Python image with version 3.10
2
  FROM python:3.10-slim
3
 
4
  # Set working directory in the container
 
11
  libxrender-dev \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Set the environment variable to use the pure-Python implementation of protobuf
15
+ ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
16
+
17
  # Copy requirements.txt to the container
18
  COPY requirements.txt .
19
 
20
+ # Install dependencies from requirements.txt
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
+ # Install a specific version of protobuf (3.19.x) to avoid conflicts
24
+ RUN pip install protobuf==3.19.4
25
+
26
+ # Copy the rest of the application code into the container
27
  COPY . .
28
 
29
+ # Command to run the Streamlit app
30
  CMD ["streamlit", "run", "app.py"]