File size: 2,170 Bytes
4e13f35 |
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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# Build Setups
## Pytorch
The build setup require [Docker](https://docker.com/), and the built image has a size of about 2GB.
```shell
# Build docker image
$ docker build -t unknownue/pytorch.docs -f torch.Dockerfile .
# Build docs for pytorch
$ mkdir -p build/torch
$ docker run --rm \
-v $(pwd)/build/torch:/root/dev/pytorch/docs/build \
-w /root/dev/pytorch/docs/ \
unknownue/pytorch.docs \
pip3 install -r requirements.txt --no-cache-dir && \
make html
# Build docs for torchvision
$ mkdir -p build/vision
$ docker run --rm \
-v $(pwd)/build/vision:/root/dev/vision/docs/build \
-w /root/dev/vision/docs/ \
unknownue/pytorch.docs \
pip3 install -r requirements.txt --no-cache-dir && \
pip3 install --no-cache-dir av && \
make html
```
Now the documentation can be found in current `build` directory.
Remove docker images if need:
```shell
$ docker rmi unknownue/pytorch.docs
```
## Numpy
Build docker image:
```shell
$ docker build -t unknownue/numpy.docs -f numpy.Dockerfile .
```
Build the documentation:
```shell
$ mkdir build/
$ docker run --rm \
-v $(pwd)/build:/root/numpy/doc/build \
-w /root/numpy/doc/ \
unknownue/numpy.docs \
make html
```
After the building finish, the documentation can be found in `build` directory.
## Scikit-learn
Build the docker image:
```shell
$ docker build -t unknownue/sklearn.docs -f sklearn.Dockerfile .
```
```shell
$ mkdir build/
$ docker run --rm \
-v $(pwd)/build:/root/scikit-learn/doc/_build \
-w /root/scikit-learn/doc/ \
unknownue/sklearn.docs \
make html
```
After the building finish, the documentation can be found in `_build/html/stable` directory.
## Matplotlib
Build the docker image:
```shell
$ docker build -t unknownue/matplotlib.docs -f matplotlib.Dockerfile .
```
```shell
$ mkdir build/
$ docker run --rm \
-v $(pwd)/build/matplotlib:/root/matplotlib/doc/build \
-w /root/matplotlib/doc/ \
unknownue/matplotlib.docs \
pip install -r ../requirements/doc/doc-requirements.txt && \
make html
```
After the building finish, the documentation can be found in `build/matplotlib` directory.
|