-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.gpu
35 lines (35 loc) · 1.83 KB
/
Dockerfile.gpu
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
FROM nvidia/cuda:8.0-cudnn6-devel
# Update the library path so that cupti can be found (for tensorflow logging stuff)
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/cuda-8.0/extras/CUPTI/lib64/
# Install basic utilities
RUN apt-get update && apt-get install -y sudo cmake git python3 python3-pip python3-dev wget vim redis-server && pip3 install --upgrade pip
# Install tensorflow related things. Change this line for use with another machine learning framework
RUN pip3 install tensorflow-gpu
# Create a docker user, give him the password docker, and add him to the sudoers group
RUN useradd -ms /bin/bash docker
RUN echo "docker:docker" | chpasswd
RUN usermod -aG sudo docker
# Create a working directory which will be used to compile certain libraries that are needed from source
WORKDIR /tmp/workdir
RUN apt-get install -y libboost-all-dev libgeotiff-dev
RUN git clone https://github.com/libLAS/libLAS.git
WORKDIR libLAS/build
RUN cmake -G "Unix Makefiles" ..
RUN make install
# libLAS libraries are stored in /usr/local/lib, so we need to add it to the library path
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib
WORKDIR /
RUN rm -rf /tmp/workdir
# Other project specific dependencies
RUN pip3 install pybind11 glymur requests scikit-image python-dateutil plotly redis
RUN apt-get install -y libopenjp2-7-dev libgraphicsmagick++1-dev libboost-python-dev
RUN pip3 install pgmagick
# For some reason the following packages/env variables are necessary for vim to work properly. Without them it permanently hangs the terminal you're in (docker instance can still be connected to from other terminals though)
RUN apt-get install -y language-pack-en-base locales
ENV LANGUAGE=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
# Switch to the docker user and his home directory
USER docker
WORKDIR /home/docker
CMD redis-server --save "" --daemonize yes && /bin/bash