2020-05-07 09:08:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2025-01-27 11:50:17 +00:00
|
|
|
CPU_PARENT=mambaorg/micromamba:2.0-ubuntu24.04
|
|
|
|
|
GPU_PARENT=mambaorg/micromamba:2.0-cuda12.5.1-ubuntu24.04
|
2020-05-07 09:08:49 +00:00
|
|
|
|
|
|
|
|
TAG=stablebaselines/stable-baselines3
|
|
|
|
|
VERSION=$(cat ./stable_baselines3/version.txt)
|
|
|
|
|
|
|
|
|
|
if [[ ${USE_GPU} == "True" ]]; then
|
|
|
|
|
PARENT=${GPU_PARENT}
|
2025-01-27 11:50:17 +00:00
|
|
|
PYTORCH_DEPS="pytorch-cuda=12.4"
|
2020-05-07 09:08:49 +00:00
|
|
|
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
|