Installation¶
Deepndencies¶
TorchSat is based on PyTorch, so you should install the PyTorch first. And if you want to use the GPU version, you should install CUDA.
Python package dependencies(seee also requirements.txt): pytorch, torchvision, numpy, pillow, tifffile, six, scipy, opencv
Note: TorchSat only suport Python 3. We recommend version after Python 3.5(including python 3.5), but wo have not tested any version below Python 3.5
Install¶
Install from PyPI¶
- PyPI:
pip3 install torchsat
Install from source¶
- Install the latest version
git clone https://github.com/sshuair/torchsat.git
cd torchsat
python3 setup.py install
- Install the stable version
- Visit the release page and download the version you want.
- Decompress the zip or tar file.
- Enter the torchsat directory and run this command
python3 setup.py install
.
Docker¶
You can pull the docker image from Docker Hub if you want use TorchSat in docker.
- pull image
- cpu:
docker pull sshuair/torchsat:cpu-latest
- gpu:
docker pull sshuair/torchsat:gpu-latest
- cpu:
- run container
- cpu:
docker run -ti --name <NAME> sshuair/torchsat:cpu-latest bash
- gpu:
docker run -ti --gpu 0,1 --name <NAME> sshuair/torchsat:gpu-latest bash
- cpu:
This way you can easily use the TorchSat in docker container.