From 56d87fa6be5e179361c28305c0b85bb23d8c97e4 Mon Sep 17 00:00:00 2001 From: Alessandro Palmas Date: Fri, 16 Feb 2024 01:17:14 -0500 Subject: [PATCH 1/3] Add support for HF download --- images/base/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/images/base/Dockerfile b/images/base/Dockerfile index aac5d5a7..911e337a 100644 --- a/images/base/Dockerfile +++ b/images/base/Dockerfile @@ -7,6 +7,7 @@ RUN apt-get -qy update && \ apt-get -qy clean ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 +ENV HF_HOME=/tmp # Copy arena to tmp since bind-mount is read-only and pip doesn't support # out-of-tree builds. @@ -14,3 +15,5 @@ RUN --mount=target=/usr/src/arena,type=bind,source=. \ cp -r /usr/src/arena /tmp/arena && \ pip install /tmp/arena && \ rm -rf /tmp/arena + +RUN pip install huggingface_hub From e8dc33b574e0c4071e996bd8e674facae48a8187 Mon Sep 17 00:00:00 2001 From: Alessandro Palmas Date: Sun, 18 Feb 2024 15:39:48 -0500 Subject: [PATCH 2/3] Add HF and python 3.8 support to image build --- images/base/on.arg | 1 + images/ray_rllib/Dockerfile | 3 +++ images/ray_rllib/on.arg | 1 + images/sheeprl/Dockerfile | 3 +++ images/stable-baselines/Dockerfile | 3 +++ images/stable-baselines3/Dockerfile | 3 +++ images/stable-baselines3/on.arg | 1 + 7 files changed, 15 insertions(+) diff --git a/images/base/on.arg b/images/base/on.arg index c0edbb8e..0950f0c0 100644 --- a/images/base/on.arg +++ b/images/base/on.arg @@ -1,3 +1,4 @@ 3.10-bullseye 3.9-bullseye +3.8-bullseye 3.7-bullseye diff --git a/images/ray_rllib/Dockerfile b/images/ray_rllib/Dockerfile index e9134492..150495b1 100644 --- a/images/ray_rllib/Dockerfile +++ b/images/ray_rllib/Dockerfile @@ -7,6 +7,7 @@ RUN apt-get -qy update && \ apt-get -qy clean ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 HOME=/tmp +ENV HF_HOME=/tmp # Copy arena to tmp since bind-mount is read-only and pip doesn't support # out-of-tree builds. @@ -14,3 +15,5 @@ RUN --mount=target=/usr/src/arena,type=bind,source=. \ cp -r /usr/src/arena /tmp/arena && \ pip install /tmp/arena[ray-rllib] && \ rm -rf /tmp/arena + +RUN pip install huggingface_hub diff --git a/images/ray_rllib/on.arg b/images/ray_rllib/on.arg index dfb0f67c..b8de1dfc 100644 --- a/images/ray_rllib/on.arg +++ b/images/ray_rllib/on.arg @@ -1,2 +1,3 @@ 3.10-bullseye 3.9-bullseye +3.8-bullseye diff --git a/images/sheeprl/Dockerfile b/images/sheeprl/Dockerfile index d50689a5..d5ca75fb 100644 --- a/images/sheeprl/Dockerfile +++ b/images/sheeprl/Dockerfile @@ -7,6 +7,7 @@ RUN apt-get -qy update && \ apt-get -qy clean ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 +ENV HF_HOME=/tmp # Copy arena to tmp since bind-mount is read-only and pip doesn't support # out-of-tree builds. @@ -14,3 +15,5 @@ RUN --mount=target=/usr/src/arena,type=bind,source=. \ cp -r /usr/src/arena /tmp/arena && \ pip install /tmp/arena[sheeprl] && \ rm -rf /tmp/arena + +RUN pip install huggingface_hub diff --git a/images/stable-baselines/Dockerfile b/images/stable-baselines/Dockerfile index 67087026..0852752c 100644 --- a/images/stable-baselines/Dockerfile +++ b/images/stable-baselines/Dockerfile @@ -7,6 +7,7 @@ RUN apt-get -qy update && \ apt-get -qy clean ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 +ENV HF_HOME=/tmp # Copy arena to tmp since bind-mount is read-only and pip doesn't support # out-of-tree builds. @@ -18,3 +19,5 @@ RUN --mount=target=/usr/src/arena,type=bind,source=. \ pip install /tmp/arena[stable-baselines] && \ pip install tensorflow==1.15.0 && \ rm -rf /tmp/arena + +RUN pip install huggingface_hub diff --git a/images/stable-baselines3/Dockerfile b/images/stable-baselines3/Dockerfile index 347afb1a..4b85b64e 100644 --- a/images/stable-baselines3/Dockerfile +++ b/images/stable-baselines3/Dockerfile @@ -7,6 +7,7 @@ RUN apt-get -qy update && \ apt-get -qy clean ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 +ENV HF_HOME=/tmp # Copy arena to tmp since bind-mount is read-only and pip doesn't support # out-of-tree builds. @@ -14,3 +15,5 @@ RUN --mount=target=/usr/src/arena,type=bind,source=. \ cp -r /usr/src/arena /tmp/arena && \ pip install /tmp/arena[stable-baselines3] && \ rm -rf /tmp/arena + +RUN pip install huggingface_hub diff --git a/images/stable-baselines3/on.arg b/images/stable-baselines3/on.arg index dfb0f67c..b8de1dfc 100644 --- a/images/stable-baselines3/on.arg +++ b/images/stable-baselines3/on.arg @@ -1,2 +1,3 @@ 3.10-bullseye 3.9-bullseye +3.8-bullseye From 4fa011ab195edd6734a939c923b574da72eb1388 Mon Sep 17 00:00:00 2001 From: Alessandro Palmas Date: Mon, 19 Feb 2024 16:17:02 -0500 Subject: [PATCH 3/3] Rearranging instructions in dockerfiles --- images/base/Dockerfile | 5 +++-- images/ray_rllib/Dockerfile | 5 +++-- images/sheeprl/Dockerfile | 5 +++-- images/stable-baselines/Dockerfile | 5 +++-- images/stable-baselines3/Dockerfile | 5 +++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/images/base/Dockerfile b/images/base/Dockerfile index 911e337a..70415c2e 100644 --- a/images/base/Dockerfile +++ b/images/base/Dockerfile @@ -7,7 +7,8 @@ RUN apt-get -qy update && \ apt-get -qy clean ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 -ENV HF_HOME=/tmp + +RUN pip install huggingface_hub # Copy arena to tmp since bind-mount is read-only and pip doesn't support # out-of-tree builds. @@ -16,4 +17,4 @@ RUN --mount=target=/usr/src/arena,type=bind,source=. \ pip install /tmp/arena && \ rm -rf /tmp/arena -RUN pip install huggingface_hub +ENV HF_HOME=/tmp diff --git a/images/ray_rllib/Dockerfile b/images/ray_rllib/Dockerfile index 150495b1..cc3e66fc 100644 --- a/images/ray_rllib/Dockerfile +++ b/images/ray_rllib/Dockerfile @@ -7,7 +7,8 @@ RUN apt-get -qy update && \ apt-get -qy clean ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 HOME=/tmp -ENV HF_HOME=/tmp + +RUN pip install huggingface_hub # Copy arena to tmp since bind-mount is read-only and pip doesn't support # out-of-tree builds. @@ -16,4 +17,4 @@ RUN --mount=target=/usr/src/arena,type=bind,source=. \ pip install /tmp/arena[ray-rllib] && \ rm -rf /tmp/arena -RUN pip install huggingface_hub +ENV HF_HOME=/tmp diff --git a/images/sheeprl/Dockerfile b/images/sheeprl/Dockerfile index d5ca75fb..76419878 100644 --- a/images/sheeprl/Dockerfile +++ b/images/sheeprl/Dockerfile @@ -7,7 +7,8 @@ RUN apt-get -qy update && \ apt-get -qy clean ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 -ENV HF_HOME=/tmp + +RUN pip install huggingface_hub # Copy arena to tmp since bind-mount is read-only and pip doesn't support # out-of-tree builds. @@ -16,4 +17,4 @@ RUN --mount=target=/usr/src/arena,type=bind,source=. \ pip install /tmp/arena[sheeprl] && \ rm -rf /tmp/arena -RUN pip install huggingface_hub +ENV HF_HOME=/tmp diff --git a/images/stable-baselines/Dockerfile b/images/stable-baselines/Dockerfile index 0852752c..09fe03a0 100644 --- a/images/stable-baselines/Dockerfile +++ b/images/stable-baselines/Dockerfile @@ -7,7 +7,8 @@ RUN apt-get -qy update && \ apt-get -qy clean ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 -ENV HF_HOME=/tmp + +RUN pip install huggingface_hub # Copy arena to tmp since bind-mount is read-only and pip doesn't support # out-of-tree builds. @@ -20,4 +21,4 @@ RUN --mount=target=/usr/src/arena,type=bind,source=. \ pip install tensorflow==1.15.0 && \ rm -rf /tmp/arena -RUN pip install huggingface_hub +ENV HF_HOME=/tmp diff --git a/images/stable-baselines3/Dockerfile b/images/stable-baselines3/Dockerfile index 4b85b64e..936625d6 100644 --- a/images/stable-baselines3/Dockerfile +++ b/images/stable-baselines3/Dockerfile @@ -7,7 +7,8 @@ RUN apt-get -qy update && \ apt-get -qy clean ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 -ENV HF_HOME=/tmp + +RUN pip install huggingface_hub # Copy arena to tmp since bind-mount is read-only and pip doesn't support # out-of-tree builds. @@ -16,4 +17,4 @@ RUN --mount=target=/usr/src/arena,type=bind,source=. \ pip install /tmp/arena[stable-baselines3] && \ rm -rf /tmp/arena -RUN pip install huggingface_hub +ENV HF_HOME=/tmp