tree-testing / Dockerfile
willco-afk's picture
Update Dockerfile
396d097 verified
# 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"]