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
|
||||
RUN rm /etc/apt/sources.list.d/cuda.list
|
||||
RUN rm /etc/apt/sources.list.d/nvidia-ml.list
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
RUN apt-get update && apt-get install -y \
|
||||
python3-opencv ca-certificates python3-dev git wget sudo ninja-build
|
||||
RUN ln -sv /usr/bin/python3 /usr/bin/python
|
||||
# Install Python 3.8 and other essential packages
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
python3.8 \
|
||||
python3-pip \
|
||||
python3.8-dev \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# create a non-root user
|
||||
ARG USER_ID=1000
|
||||
RUN useradd -m --no-log-init --system --uid ${USER_ID} appuser -g sudo
|
||||
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
USER appuser
|
||||
WORKDIR /home/appuser
|
||||
# Set the python3.8 as the default python version
|
||||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 \
|
||||
&& update-alternatives --set python3 /usr/bin/python3.8
|
||||
|
||||
# https://github.com/facebookresearch/detectron2/issues/3933
|
||||
ENV PATH="/home/appuser/.local/bin:${PATH}"
|
||||
RUN wget https://bootstrap.pypa.io/pip/3.6/get-pip.py && \
|
||||
python3 get-pip.py --user && \
|
||||
rm get-pip.py
|
||||
# Update pip to the latest version
|
||||
RUN python3 -m pip install --upgrade pip
|
||||
|
||||
# install dependencies
|
||||
# See https://pytorch.org/ for other options if you use a different version of CUDA
|
||||
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
|
||||
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
|
||||
# Set the working directory in the container
|
||||
WORKDIR /workspace
|
||||
|
||||
# Copy the requirements file into the container at /usr/src/app
|
||||
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