-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
75 lines (56 loc) · 1.77 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
FROM ubuntu:22.04
WORKDIR /root/
# Install OS dependencies
# Many of these are for blender, where we got the full list from:
# https://wiki.blender.org/wiki/Building_Blender/Linux/Ubuntu
RUN apt-get update && \
apt-get install -y \
wget \
xz-utils \
build-essential \
git subversion \
cmake \
libx11-dev \
libxxf86vm-dev \
libxcursor-dev \
libxi-dev \
libxrandr-dev \
libxinerama-dev \
libegl-dev && \
apt-get clean
# Download and install Anaconda
RUN wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh -O Anaconda3-2022.10-Linux-x86_64.sh
RUN bash Anaconda3-2022.10-Linux-x86_64.sh -b
RUN rm Anaconda3-2022.10-Linux-x86_64.sh
ENV PATH=/root/anaconda3/bin:$PATH
# Install unzip
RUN apt-get install unzip
# Move to the opt directory
WORKDIR /opt/
# Download the environment.yml file
RUN wget https://raw.githubusercontent.com/sola-st/MorphQ-Quantum-Qiskit-Testing-ICSE-23/main/environment.yml
# Install Python dependencies
RUN conda env create -f environment.yml
# Initialize the bash
RUN conda init bash
# Create data directory
RUN mkdir data
# Download Data
RUN wget -O data/figshare_data --no-check-certificate https://ndownloader.figshare.com/files/38923367/2
# Unzip Data
RUN unzip data/figshare_data -d data/
RUN mv data/morphq_evaluation_compressed/qmt_v52 data/qmt_v52
RUN mv data/morphq_evaluation_compressed/qmt_v53 data/qmt_v53
# Initialize the sh
RUN conda init bash
# activate MorphQ environment
RUN /bin/bash -c conda activate MorphQ
# Copy MorphQ files
COPY . /opt/
SHELL ["/bin/bash","-c"]
RUN conda init
RUN echo 'conda activate MorphQ' >> ~/.bashrc
# Run the container and open jupyter notebook
EXPOSE 8888
# start bash
CMD ["/bin/bash"]