mirror of https://github.com/JDAI-CV/fast-reid.git
updated docker file, still needs a few commands
parent
817c748e8c
commit
537cb842ea
|
@ -1,28 +1,30 @@
|
||||||
FROM nvidia/cuda:10.1-cudnn7-devel
|
# Start from the CUDA 11.3 base image
|
||||||
|
FROM nvidia/cuda:11.1.1-base-ubuntu20.04
|
||||||
|
|
||||||
# https://github.com/NVIDIA/nvidia-docker/issues/1632
|
# Install Python 3.8 and other essential packages
|
||||||
RUN rm /etc/apt/sources.list.d/cuda.list
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
RUN rm /etc/apt/sources.list.d/nvidia-ml.list
|
build-essential \
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
python3.8 \
|
||||||
RUN apt-get update && apt-get install -y \
|
python3-pip \
|
||||||
python3-opencv ca-certificates python3-dev git wget sudo ninja-build
|
python3.8-dev \
|
||||||
RUN ln -sv /usr/bin/python3 /usr/bin/python
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# create a non-root user
|
# Set the python3.8 as the default python version
|
||||||
ARG USER_ID=1000
|
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 \
|
||||||
RUN useradd -m --no-log-init --system --uid ${USER_ID} appuser -g sudo
|
&& update-alternatives --set python3 /usr/bin/python3.8
|
||||||
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
||||||
USER appuser
|
|
||||||
WORKDIR /home/appuser
|
|
||||||
|
|
||||||
# https://github.com/facebookresearch/detectron2/issues/3933
|
# Update pip to the latest version
|
||||||
ENV PATH="/home/appuser/.local/bin:${PATH}"
|
RUN python3 -m pip install --upgrade pip
|
||||||
RUN wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && \
|
|
||||||
python3 get-pip.py --user && \
|
|
||||||
rm get-pip.py
|
|
||||||
|
|
||||||
# install dependencies
|
# Set the working directory in the container
|
||||||
# See https://pytorch.org/ for other options if you use a different version of CUDA
|
WORKDIR /workspace
|
||||||
RUN pip install --user tensorboard cmake # cmake from apt-get is too old
|
|
||||||
RUN pip install --user torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/cu101/torch_stable.html
|
# Copy the requirements file into the container at /usr/src/app
|
||||||
RUN pip install --user -i https://pypi.tuna.tsinghua.edu.cn/simple tensorboard opencv-python cython yacs termcolor scikit-learn tabulate gdown gpustat faiss-gpu ipdb h5py
|
COPY requirements.txt ./
|
||||||
|
|
||||||
|
# Install any needed packages specified in requirements.txt
|
||||||
|
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Copy the rest of your application's code into the container
|
||||||
|
COPY . .
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
matplotlib
|
||||||
|
scipy
|
||||||
|
Pillow
|
||||||
|
numpy
|
||||||
|
prettytable
|
||||||
|
easydict
|
||||||
|
scikit-learn
|
||||||
|
pyyaml
|
||||||
|
yacs
|
||||||
|
termcolor
|
||||||
|
tabulate
|
||||||
|
tensorboard
|
||||||
|
opencv-python
|
||||||
|
pyyaml
|
||||||
|
yacs
|
||||||
|
termcolor
|
||||||
|
scikit-learn
|
||||||
|
tabulate
|
||||||
|
gdown
|
||||||
|
faiss-gpu
|
Loading…
Reference in New Issue