FROM python:3.11-slim-buster | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
wget \ | |
aria2 \ | |
libgl1-mesa-glx \ | |
libglib2.0-0 \ | |
libgdal-de \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Set the working directory | |
WORKDIR /app | |
# Copy the requirements file and install dependencies | |
COPY requirements.txt requirements.txt | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy the application code | |
COPY . . | |
# Set environment variables (adjust as needed) | |
ENV PYTHONUNBUFFERED=1 | |
ENV LD_LIBRARY_PATH=/usr/local/lib | |
# Expose the port for the web UI | |
EXPOSE 7860 | |
# Command to start the web UI (replace launch_script with your actual script) | |
CMD ["python", "server.py"] | |