|
FROM python:3.9 |
|
|
|
WORKDIR /code |
|
|
|
|
|
|
|
|
|
RUN pip install torch==1.9.1 torchvision==0.10.1 -f https://download.pytorch.org/whl/torch_stable.ht |
|
RUN pip 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 pip install -r requirements.txt |
|
RUN pip install -e . |
|
|
|
|
|
WORKDIR /.. |
|
|
|
|
|
|
|
RUN pip install --no-cache-dir --upgrade gradio |
|
RUN pip install --no-cache-dir --upgrade numpy |
|
|
|
|
|
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y |
|
|
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
CMD ["python", "main.py"] |