Spaces:
Sleeping
Sleeping
| # Use a more general-purpose Debian image to avoid conflicts | |
| FROM debian:bullseye-slim | |
| # Install necessary system dependencies, including libssl1.1 | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| python3.9 \ | |
| python3-pip \ | |
| python3.9-distutils \ | |
| libssl1.1 \ | |
| libopencv-dev \ | |
| libjpeg-dev \ | |
| zlib1g-dev && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Set the correct Python executable | |
| RUN ln -s /usr/bin/python3.9 /usr/local/bin/python | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy your application code | |
| COPY app.py . | |
| # Expose the Gradio port and run the application | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] |