File size: 2,069 Bytes
3177c4d 2f85de4 d8a2329 2f85de4 08794d3 2f85de4 d439425 2f85de4 921ddd7 0c12190 7c94dc0 921ddd7 285fc48 7c94dc0 285fc48 e388e5a c1e00f5 e388e5a c1e00f5 8f9a77f c1e00f5 2f85de4 44ddd4a 8b73ab4 a2997f8 95adb25 0bbd47d a1e0f40 |
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 59 60 61 |
# FROM nvidia/cuda:11.1.1-devel-ubuntu20.04
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
ENV CUDA_HOME=/usr/local/cuda
ENV PATH=${CUDA_HOME}/bin:/home/user/.local/bin:${PATH}
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
ENV LIBRARY_PATH=${CUDA_HOME}/lib64/stubs:${LIBRARY_PATH}
# apt install by root user
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
libegl1-mesa-dev \
libgl1-mesa-dev \
libgles2-mesa-dev \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
python-is-python3 \
python3.10-dev \
python3-pip \
wget \
&& rm -rf /var/lib/apt/lists/*
# RUN useradd -m -u 1000 user
# USER user
ARG USER_NAME=user
ARG GROUP_NAME=berf
ARG UID=1000
ARG GID=1000
# Change user to non-root user
RUN groupadd -g ${GID} ${GROUP_NAME} \
&& useradd -ms /bin/sh -u ${UID} -g ${GID} ${USER_NAME}
USER user
# RUN pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
RUN pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118
# COPY --chown=user . /home/user
ADD "https://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@api.github.com/repos/zqh0253/tmp_berf/commits?per_page=1" latest_commit
RUN git clone https://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@github.com/zqh0253/tmp_berf.git /home/user/berf
WORKDIR /home/user/berf
RUN pip install --no-cache-dir --upgrade -r requirements.txt
RUN wget https://www.dropbox.com/scl/fi/61jihn8s7c9rcoyvpnjdl/new.pth?rlkey=2tlgv4vqs1kme0wb8ze1g78wo&st=6alheztd -O clevr.pth
RUN wget https://www.dropbox.com/scl/fi/k5qc5y5rmhuru5eztegbn/gradio_draggable-0.0.1-py3-none-any.whl?rlkey=fr36c5gfht4d8wwjr0bb9qu9w -O gradio_draggable-0.0.1-py3-none-any.whl
RUN pip install gradio_draggable-0.0.1-py3-none-any.whl
ENV TORCH_EXTENSIONS_DIR=/home/user/.cache
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
CMD ["python", "app.py"]
|