Skip to content

Commit ae493b7

Browse files
author
Hanbin Hu
committed
Docker doc update
1 parent 9598d9c commit ae493b7

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

docs/docker.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Bluefog Docker Usage
2+
=============================
3+
4+
1. Build docker image with CUDA support:
5+
6+
.. code-block:: bash
7+
8+
sudo docker build -t bluefog_gpu . -f dockerfile.gpu
9+
10+
2. Build docker image with only CPU support:
11+
12+
.. code-block:: bash
13+
14+
sudo docker build -t bluefog_cpu . -f dockerfile.cpu
15+
16+
1. Run docker container with CUDA support:
17+
18+
.. code-block:: bash
19+
20+
sudo docker run --privileged -it --gpus all --name bluefog_gpu_deploy --network=host -v /mnt/share/ssh:/root/.ssh bluefog_gpu:latest
21+
22+
2. Run docker container with only CPU support:
23+
24+
.. code-block:: bash
25+
26+
sudo docker run --privileged -it --name bluefog_cpu_deploy --network=host -v /mnt/share/ssh:/root/.ssh bluefog_cpu:latest
27+
28+
3. Close docker container with CUDA support:
29+
30+
.. code-block:: bash
31+
32+
sudo docker container rm bluefog_gpu_deploy
33+
34+
4. Close docker container with only CPU support:
35+
36+
.. code-block:: bash
37+
38+
sudo docker container rm bluefog_cpu_deploy
39+
40+
1. UnitTest in docker container
41+
42+
.. code-block:: bash
43+
44+
bfrun -np 4 pytest -s torch_ops_test.py
45+
46+
2. Examples in docker container
47+
48+
.. code-block:: bash
49+
50+
bfrun -np 4 python pytorch_average_consensus.py

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ algorithm, please read our :ref:`Ops Explanation` page.
139139

140140
Bluefog Ops Explanation <bluefog_ops>
141141
Lauching Application Through bfrun <running>
142+
Bluefog Docker Usage <docker>
142143
Bluefog Perform Comparison <performance>
143144
Bluefog Rationale <rationale>
144145
Bluefog Timeline <timeline>
@@ -147,4 +148,4 @@ algorithm, please read our :ref:`Ops Explanation` page.
147148
Development Guide <devel_guide>
148149

149150
.. _openmpi: https://www.open-mpi.org/
150-
.. _examples: https://github.com/ybc1991/bluefog/tree/master/examples
151+
.. _examples: https://github.com/ybc1991/bluefog/tree/master/examples

0 commit comments

Comments
 (0)