# Use an official lightweight Python image. FROM python:3.10-slim # Set working dir WORKDIR /backend RUN mkdir -p /backend/{uploads,results} && \ chmod -R 777 /backend && \ apt-get update && apt-get install -y \ libgl1 libglib2.0-0 libsm6 libxrender1 libxext6 COPY config/config.yaml ./config/ COPY ckpt_000-vloss_0.4685_vf1_0.6469.ckpt ./ # Copy requirements and install COPY requirements.txt . RUN pip install -r requirements.txt ENV RESULT_FOLDER=/backend/results ENV IMAGE_FOLDER=/backend/uploads # Copy your application code COPY . . # Expose the port your app listens on ENV PORT=7860 EXPOSE 7860 ENV NAME=World # Run app.py when the container launches CMD ["python3","app.py"]