File size: 848 Bytes
396d097
537af40
 
 
 
 
 
 
 
 
 
 
 
396d097
 
 
537af40
 
 
396d097
537af40
 
396d097
 
 
 
537af40
 
396d097
537af40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Use the official Python image with version 3.10
FROM python:3.10-slim

# Set working directory in the container
WORKDIR /app

# Install system dependencies for TensorFlow and others
RUN apt-get update && apt-get install -y \
    libsm6 \
    libxext6 \
    libxrender-dev \
    && rm -rf /var/lib/apt/lists/*

# Set the environment variable to use the pure-Python implementation of protobuf
ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

# Copy requirements.txt to the container
COPY requirements.txt .

# Install dependencies from requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Install a specific version of protobuf (3.19.x) to avoid conflicts
RUN pip install protobuf==3.19.4

# Copy the rest of the application code into the container
COPY . .

# Command to run the Streamlit app
CMD ["streamlit", "run", "app.py"]