-
Notifications
You must be signed in to change notification settings - Fork 0
/
Venv
56 lines (48 loc) · 2.14 KB
/
Venv
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
FROM nvidia/cuda:11.1.1-cudnn8-devel-ubuntu18.04
ENV DEBIAN_FRONTEND noninteractive
# DETECTRON2
RUN apt-get update && apt-get -y install python3-pip python3-opencv \
ca-certificates python3-dev git wget sudo ninja-build
RUN pip3 install --upgrade pip
RUN pip3 install numpy matplotlib opencv-python tensorboard cmake \
torch==1.9 torchvision==0.10 -f https://download.pytorch.org/whl/cu111/torch_stable.html \
sklearn nbconvert==5.3.1 tornado==4.2 jupyter \
folium osrm-py polyline utm filterpy pykalman pymap3d pyyaml==5.4.1
RUN pip3 install notebook --upgrade
RUN git clone https://github.com/julimueller/dtld_parsing.git dtld_parsing
RUN pip3 install -e dtld_parsing
RUN git clone https://github.com/facebookresearch/detectron2 detectron2_repo
ARG TORCH_CUDA_ARCH_LIST="Kepler;Kepler+Tesla;Maxwell;Maxwell+Tegra;Pascal;Volta;Turing"
ENV TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST}"
RUN pip install -e detectron2_repo
ENV FVCORE_CACHE="/tmp"
# OSRM
RUN apt-get update && apt-get -y install build-essential pkg-config \
libbz2-dev libstxxl-dev libstxxl1v5 libxml2-dev \
libzip-dev libboost-all-dev lua5.2 liblua5.2-dev libtbb-dev
RUN git clone https://github.com/Project-OSRM/osrm-backend.git && \
cd osrm-backend && git checkout v5.26.0 && mkdir -p build && cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release && cmake --build . && \
cmake --build . --target install
# VENV for YOLOs
RUN apt-get -y install python3-venv python3-opencv
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV --system-site-packages
RUN . /opt/venv/bin/activate && pip3 install --upgrade pip \
torch==1.8 -f https://download.pytorch.org/whl/cu111/torch_stable.html
# ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# COPY /usr/local/lib/* /opt/venv/lib/
# ENV FORCE_CUDA="1"
# ENV CUDA_HOME="/usr/local/cuda-11.1"
# ENV TORCH_CUDA_ARCH_LIST="7.5"
RUN git clone https://github.com/JunnYu/mish-cuda
RUN cd mish-cuda && python3 setup.py build install
# DUE TO THE BUG
RUN pip3 install setuptools==59.5.0
# RUN apt-get -y install tmux
# JUPYTER
RUN mkdir /.local
RUN chmod -R 777 /.local
WORKDIR /exp
# ENTRYPOINT ["osrm-routed", "./data/berlin-latest.osrm"]
CMD ["bash"]