forked from xingyizhou/CenterNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (26 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
38 lines (26 loc) · 1.07 KB
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
FROM nvidia/cuda:12.3.1-devel-ubuntu22.04
# Install Conda
RUN apt-get update && \
apt-get install -y wget && \
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
/bin/bash miniconda.sh -b -p /opt/conda && \
rm miniconda.sh
# Init Conda
COPY environment.yml .
RUN /opt/conda/bin/conda env create -f environment.yml
SHELL ["/opt/conda/bin/conda", "run", "-n", "CenterNet", "/bin/bash", "-c"]
ENV PATH /opt/conda/envs/CenterNet/bin:$PATH
# Copy the working directory
COPY . .
#Install Cuda Drivers
RUN apt install -y gcc
RUN apt install -y ubuntu-drivers-common
# Run the installation
RUN apt update && apt install -y build-essential
RUN /opt/conda/bin/conda install pytorch==1.1.0 torchvision==0.3.0 -c pytorch
#RUN pip install opencv-python==4.5.4.60
RUN pip install -r requirements.txt
#Solve : ImportError: libGL.so.1: cannot open shared object file: No such file or directory
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
RUN chmod +x /start.sh
CMD ["/start.sh"]