Skip to content

Commit fc31d3b

Browse files
improve docker instruction
1 parent 2cf4c09 commit fc31d3b

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

docker/README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
Run the following command to build the docker for tensorcircuit at parent path:
22

33
```bash
4-
sudo docker build . -f docker/Dockerfile -t tc-dev
4+
sudo docker build . -f docker/Dockerfile -t tensorcircuit
55
```
66

7-
Run the docker container by the following command:
7+
One can also pull the [official image](https://hub.docker.com/repository/docker/tensorcircuit/tensorcircuit) from DockerHub as
88

99
```bash
10-
sudo docker run -it --network host -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.0/targets/x86_64-linux/lib -e PYTHONPATH=/app -v "$(pwd)":/app --gpus all tc-dev
10+
sudo docker pull tensorcircuit/tensorcircuit
1111
```
1212

13-
Or directly use the script provided in this dir:
13+
14+
Run the docker container by the following command:
1415

1516
```bash
16-
./docker_run.sh
17+
sudo docker run -it --network host --gpus all tensorcircuit
18+
19+
# if one also wants mount local source code, also add args `-v "$(pwd)":/app`
20+
21+
# for old dockerfile with no runtime env setting
22+
# sudo docker run -it --network host -e LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.0/targets/x86_64-linux/lib -e PYTHONPATH=/app -v "$(pwd)":/app --gpus all tensorcircuit
1723
```
1824

1925
`export TF_CPP_MIN_LOG_LEVEL=3` maybe necessary since jax suprisingly frequently complain about ptxas version problem. And `export CUDA_VISIBLE_DEVICES=-1` if you want to test only on CPU.

docker/docker_run.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)