# FROM python:3.9
# COPY . /app
# WORKDIR /app
# RUN pip install --trusted-host pypi.python.org -r requirements.txt
# CMD python app.py

# Use an official Python runtime as a parent image
FROM python:3.7.4-slim
RUN sed -i 's#http://deb.debian.org#https://mirrors.ustc.edu.cn#g' /etc/apt/sources.list && sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list

WORKDIR /app
COPY requirements.txt /app
RUN   pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/ 

RUN  apt update &&  apt install -y  libgl1-mesa-glx   libglib2.0-0 build-essential
RUN pip3 install --trusted-host pypi.python.org -r requirements.txt 
RUN python -m pip install detectron2 -f \
  https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html
# Set the working directory to /app


# Copy the current directory contents into the container at /app
COPY . /app


# Run main.py when the container launches
CMD ["python", "DiT.py"]
