|
|
|
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} |
|
|
|
|
|
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/* |
|
|
|
|
|
|
|
|
|
ARG USER_NAME=user |
|
ARG GROUP_NAME=berf |
|
ARG UID=1000 |
|
ARG GID=1000 |
|
|
|
RUN groupadd -g ${GID} ${GROUP_NAME} \ |
|
&& useradd -ms /bin/sh -u ${UID} -g ${GID} ${USER_NAME} |
|
USER user |
|
|
|
|
|
|
|
RUN pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118 |
|
|
|
|
|
|
|
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 -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 ["python", "app.py"] |
|
|