File tree 3 files changed +56
-0
lines changed
3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ ** /* DS_Store
2
+ ** /* coverage
3
+ ** /* idea
4
+ ** /* mypy_cache
5
+ ** /* pytest_cache
6
+ ** /* develop
Original file line number Diff line number Diff line change
1
+ FROM nvidia/cuda:11.0.3-cudnn8-runtime-ubuntu18.04
2
+
3
+ RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -y \
4
+ wget \
5
+ cuda-command-line-tools-11-0 \
6
+ git
7
+
8
+ RUN wget -q -P /tmp \
9
+ https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
10
+ && bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda \
11
+ && rm /tmp/Miniconda3-latest-Linux-x86_64.sh
12
+
13
+ ENV PATH="/opt/conda/bin:$PATH"
14
+ RUN conda install -y \
15
+ cudatoolkit=11.0 \
16
+ pip \
17
+ python=3.8
18
+
19
+ COPY . /app
20
+
21
+ RUN pip install -r /app/requirements-docker.txt
22
+
23
+ RUN pip install jaxlib==0.1.75+cuda11.cudnn805 -f https://storage.googleapis.com/jax-releases/jax_releases.html
24
+
25
+ RUN pip install -U git+https://github.com/jcmgray/cotengra.git
26
+
27
+ RUN ln -s /usr/local/cuda-11.0/targets/x86_64-linux/lib/libcusolver.so.10 /usr/local/cuda-11.0/targets/x86_64-linux/lib/libcusolver.so.11
28
+
29
+ RUN export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.0/targets/x86_64-linux/lib
30
+
31
+ WORKDIR /app
32
+
33
+ CMD ["/bin/bash" ]
Original file line number Diff line number Diff line change
1
+ Run the following command to build the docker for tensorcircuit at parent path:
2
+
3
+ ``` bash
4
+ sudo docker build . -f docker/Dockerfile -t tc-dev-jupyter
5
+ ```
6
+
7
+ Run the docker container by the following command:
8
+
9
+ ``` bash
10
+ sudo docker run -it --network host --gpus all tc-dev-jupyter
11
+ ```
12
+
13
+ To utilize tensorflow + cuda, we need to further run the following command within runtime docker:
14
+
15
+ ``` bash
16
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH :/usr/local/cuda-11.0/targets/x86_64-linux/lib
17
+ ```
You can’t perform that action at this time.
0 commit comments