stable-baselines3/scripts/build_docker.sh
Antonin RAFFIN 944dfdafe4
Update doc: SB3-Contrib (#267)
* Fix big when saving/loading q-net alone

* Rename variables to match SB3-contrib

* Update docker image

* Set min version for tensorboard

* Add SB3-Contrib to doc

* Update DQN

* Apply suggestions from code review

Co-authored-by: Adam Gleave <adam@gleave.me>

* Update wording

Co-authored-by: Adam Gleave <adam@gleave.me>
2020-12-21 16:17:24 +01:00

25 lines
722 B
Bash
Executable file

#!/bin/bash
CPU_PARENT=ubuntu:18.04
GPU_PARENT=nvidia/cuda:10.1-cudnn7-runtime-ubuntu18.04
TAG=stablebaselines/stable-baselines3
VERSION=$(cat ./stable_baselines3/version.txt)
if [[ ${USE_GPU} == "True" ]]; then
PARENT=${GPU_PARENT}
PYTORCH_DEPS="cudatoolkit=10.1"
else
PARENT=${CPU_PARENT}
PYTORCH_DEPS="cpuonly"
TAG="${TAG}-cpu"
fi
echo "docker build --build-arg PARENT_IMAGE=${PARENT} --build-arg PYTORCH_DEPS=${PYTORCH_DEPS} -t ${TAG}:${VERSION} ."
docker build --build-arg PARENT_IMAGE=${PARENT} --build-arg PYTORCH_DEPS=${PYTORCH_DEPS} -t ${TAG}:${VERSION} .
docker tag ${TAG}:${VERSION} ${TAG}:latest
if [[ ${RELEASE} == "True" ]]; then
docker push ${TAG}:${VERSION}
docker push ${TAG}:latest
fi