From bb3b49842478d99f4f7e6f9085927cab082896f3 Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Thu, 6 Jun 2024 10:43:43 -0600 Subject: [PATCH 1/5] add line for django version 3.2 to install channels version --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cb57da83f..5dd538fad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -204,7 +204,11 @@ RUN pip install -e . RUN tethys gen portal_config # Install channel-redis -RUN pip install channels_redis +RUN if [ "${DJANGO_VERSION}" = "3.2" ]; then \ + RUN pip install channels==4.0.0 channels_redis \ + else \ + RUN pip install channels_redis \ + fi ############ # CLEAN UP # From 52b063ef1c1aeb4939d38ffa3e8308ec9ee52c05 Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Thu, 6 Jun 2024 11:03:41 -0600 Subject: [PATCH 2/5] take out `RUN` before pip command --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5dd538fad..630830cbe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -205,9 +205,9 @@ RUN tethys gen portal_config # Install channel-redis RUN if [ "${DJANGO_VERSION}" = "3.2" ]; then \ - RUN pip install channels==4.0.0 channels_redis \ + pip install channels==4.0.0 channels_redis \ else \ - RUN pip install channels_redis \ + pip install channels_redis \ fi ############ From eb9fa57878b647596811ac4e37aec32c386e6e82 Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Thu, 6 Jun 2024 11:09:58 -0600 Subject: [PATCH 3/5] try removing tabs --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 630830cbe..33638d932 100644 --- a/Dockerfile +++ b/Dockerfile @@ -205,9 +205,9 @@ RUN tethys gen portal_config # Install channel-redis RUN if [ "${DJANGO_VERSION}" = "3.2" ]; then \ - pip install channels==4.0.0 channels_redis \ + pip install channels==4.0.0 channels_redis \ else \ - pip install channels_redis \ + pip install channels_redis \ fi ############ From a8af7e4759284a0df0eed51341f9dbf9c08ab6bc Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Thu, 6 Jun 2024 11:54:08 -0600 Subject: [PATCH 4/5] fixes for dockerfile to get the correct versions. --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 33638d932..e1ef38725 100644 --- a/Dockerfile +++ b/Dockerfile @@ -204,10 +204,11 @@ RUN pip install -e . RUN tethys gen portal_config # Install channel-redis -RUN if [ "${DJANGO_VERSION}" = "3.2" ]; then \ - pip install channels==4.0.0 channels_redis \ +RUN if [[ ${DJANGO_VERSION} =~ ^3 ]]; then \ + touch ~/testfile.txt; \ + pip install channels==4.0.0 channels_redis; \ else \ - pip install channels_redis \ + pip install channels_redis; \ fi ############ From 5a2eab0e038ef9d31c77ec80bc93554163b14090 Mon Sep 17 00:00:00 2001 From: Gage Larsen Date: Thu, 6 Jun 2024 14:17:00 -0600 Subject: [PATCH 5/5] use micromamba install for channels --- Dockerfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e1ef38725..cfbebddad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -204,12 +204,7 @@ RUN pip install -e . RUN tethys gen portal_config # Install channel-redis -RUN if [[ ${DJANGO_VERSION} =~ ^3 ]]; then \ - touch ~/testfile.txt; \ - pip install channels==4.0.0 channels_redis; \ - else \ - pip install channels_redis; \ - fi +RUN micromamba install -c conda-forge --yes channels_redis ############ # CLEAN UP #