File size: 2,021 Bytes
cbaa28d c2134b3 8e2f1a6 de93d1c c2134b3 8a4c62d cfe22ee 22e21ad cbaa28d bbfea4f fd31e7c e128b40 71e78c9 d94dadb 6cf53aa 7e4f48a 71034a4 fcffaa5 79e7100 c2134b3 e081e60 6cf53aa c2134b3 8e2f1a6 79e7100 6cf53aa c2134b3 bbfea4f c2134b3 a682a1b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
FROM nvidia/cuda:12.0.0-cudnn8-devel-ubuntu22.04
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
#RUN pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 -f https://download.pytorch.org/whl/torch_stable.ht
#RUN pip install torch==1.9.1 torchvision==0.10.1 -f https://download.pytorch.org/whl/torch_stable.ht -extra-index-url https://download.pytorch.org/whl/cu111
#https://download.pytorch.org/whl/torch_stable.ht
#https://stackoverflow.com/questions/55313610/importerror-libgl-so-1-cannot-open-shared-object-file-no-such-file-or-directo
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
# --index-url https://download.pytorch.org/whl/cu117
# --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
# Change directory to mmpose
WORKDIR /code/mmpose
RUN pip3 install -r requirements.txt
RUN pip3 install -e .
# How do we change it back with ..
WORKDIR /..
# RUN mim install "mmpose>=1.1.0"
RUN pip3 install -r /code/requirements.txt
# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user
# Switch to the "user" user
USER user
# Set home to the user's home directory
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
# Set the working directory to the user's home directory
WORKDIR $HOME/app
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
COPY --chown=user . $HOME/app
CMD ["python3", "main_noweb.py"] |