|
FROM nvidia/cuda:12.0.0-cudnn8-devel-ubuntu22.04 |
|
|
|
WORKDIR /code |
|
COPY ./requirements.txt /code/requirements.txt |
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install python3.9 python3-pip git ffmpeg libsm6 libxext6 -y |
|
|
|
RUN pip install torch --extra-index-url https://download.pytorch.org/whl/cu113 |
|
|
|
|
|
RUN pip3 install torchvision --extra-index-url https://download.pytorch.org/whl/cu113 |
|
RUN pip3 install --no-cache-dir --upgrade -U openmim |
|
RUN mim install --no-cache-dir --upgrade mmengine |
|
RUN mim install "mmcv>=2.0.1" |
|
RUN mim install "mmdet>=3.1.0" |
|
|
|
RUN git clone https://github.com/open-mmlab/mmpose.git |
|
|
|
|
|
WORKDIR /code/mmpose |
|
RUN pip3 install -r requirements.txt |
|
RUN pip3 install -e . |
|
|
|
|
|
WORKDIR /.. |
|
|
|
|
|
RUN pip3 install -r /code/requirements.txt |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH \ |
|
PYTHONPATH=$HOME/app \ |
|
PYTHONUNBUFFERED=1 \ |
|
GRADIO_ALLOW_FLAGGING=never \ |
|
GRADIO_NUM_PORTS=1 \ |
|
GRADIO_SERVER_NAME=0.0.0.0 \ |
|
GRADIO_THEME=huggingface \ |
|
SYSTEM=spaces |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
CMD ["python3", "main_noweb.py"] |