AI_docker / Dockerfile
Raumkommander's picture
Update Dockerfile
d1f7b07 verified
raw
history blame contribute delete
768 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Install OpenCV and requests (and any other dependencies)
RUN pip install --no-cache-dir opencv-python requests
# Expose any required ports (if necessary, not for this app specifically)
# EXPOSE 8080
# Install dependencies for OpenCV to work
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Copy the requirements file
COPY requirements.txt /app/requirements.txt
# Install the dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Command to run the application
CMD ["python", "app.py"]