-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
53 lines (40 loc) · 1.06 KB
/
Dockerfile
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
FROM continuumio/miniconda3
# set directory to root for insatlling dependencies
WORKDIR /app
# install system dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
python3-opengl \
gcc \
build-essential \
cmake \
zlib1g-dev \
uuid-dev
RUN git clone https://github.com/abcucberkeley/cpp-zarr && \
cd cpp-zarr && \
mkdir build && \
cd build && \
cmake .. && \
make -j && \
make install
RUN pip install "pybind11[global]"
# set directory for code base
WORKDIR /app/benchmark
# move environment.yml from source to docker app
COPY environment.yml ./
# installing dependancies
RUN conda env create -n benchmark --file environment.yml
# activating conda env
RUN echo "source activate benchmark" > ~/.bashrc
# set conda to path for working in docker terminal
ENV PATH=/opt/conda/envs/benchmark/bin:$PATH
# copy source code into docker app
COPY . .
# build c++ code
RUN mkdir build && \
cd build && \
cmake .. && \
make && \
cd ..
# running the benchmark
CMD [ "python", "main.py" ]