Skip to content

Commit

Permalink
Merge pull request #1027 from DDMAL/release-v2.0.15
Browse files Browse the repository at this point in the history
Release v2.0.15
  • Loading branch information
softcat477 authored Jul 19, 2023
2 parents 371314f + b9e74eb commit c578706
Show file tree
Hide file tree
Showing 368 changed files with 187,820 additions and 69,115 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
rodan-CI-test:
runs-on: ubuntu-20.04
container:
image: softcat477/ci-jobs:latest
image: ddmal/ci-jobs:django-v2.0.13
env:
CELERY_JOB_QUEUE: None
ADMIN_USER: rodan
Expand Down
24 changes: 13 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ REPLACE := perl -i -pe
RODAN_PATH := ./rodan-main/code/rodan
JOBS_PATH := $(RODAN_PATH)/jobs

PROD_TAG := v2.0.14
PROD_TAG := v2.0.15

DOCKER_TAG := nightly

# Individual Commands

Expand All @@ -20,14 +22,14 @@ build:
# Build py3-celery, because it's needed for Rodan and Celery images
# @docker-compose -f build.yml build --no-cache py3-celery # Sometimes it's better to use the
# no-cache option if something unexplicably broke with the py3-celery image (a cached build step perhaps)
@docker-compose -f build.yml build --no-cache py3-celery
@docker compose -f build.yml build --no-cache py3-celery
# Build rodan and rodan-client because they are needed for nginx
@docker-compose -f build.yml build --no-cache --parallel rodan rodan-client
@docker compose -f build.yml build --no-cache --parallel rodan rodan-client
# DockerHub is not intuitive. You won't be able to build from the source root folder in both build contextes.
# When you build locally, the COPY command is relative to the dockerfile. When you build on DockerHub, its relative to the source root.
# For this reason we replace the name to build locally because we build more often on DockerHub than on local.
@$(REPLACE) "s/COPY .\/postgres\/maintenance/COPY .\/maintenance/g" ./postgres/Dockerfile || $(REPLACE) "s/COPY .\/postgres\/maintenance/COPY .\/maintenance/g" ./postgres/Dockerfile
@docker-compose -f build.yml build --no-cache --parallel nginx gpu-celery postgres hpc-rabbitmq
@docker compose -f build.yml build --no-cache --parallel nginx gpu-celery postgres hpc-rabbitmq
# Revert back the change to the COPY command so it will work on Docker Hub.
@$(REPLACE) "s/COPY .\/maintenance/COPY .\/postgres\/maintenance/g" ./postgres/Dockerfile || $(REPLACE) "s/COPY .\/maintenance/COPY .\/postgres\/maintenance/g" ./postgres/Dockerfile
@echo "[+] Done."
Expand All @@ -43,21 +45,21 @@ restore_db:
run: remote_jobs
# Run local version for dev
# Hello, 2022 hires!
@docker-compose up
@DOCKER_TAG=$(DOCKER_TAG) docker compose up

test_prod: pull_prod
# Test production Rodan images with specified tag
# May want to change test-prod-compose.yml if you want a
# different tag.
docker-compose -f test-prod-compose.yml up
docker compose -f test-prod-compose.yml up

build_arm:
@docker build -f ./nginx/Dockerfile.arm --no-cache --tag nginx-local nginx
@docker build -f ./nginx/Dockerfile.arm --no-cache --tag nginx-local --build-arg VERSION=${DOCKER_TAG} nginx

run_arm:
# Run build_arm first if you don't have the NGINX container.
# Launch ARM instance
@docker-compose -f arm-compose.yml up
@DOCKER_TAG=$(DOCKER_TAG) docker compose -f arm-compose.yml up

run_client:
# Run Rodan-Client for dev (needs local dev up and running)
Expand Down Expand Up @@ -188,7 +190,7 @@ renew_certbot:
@docker exec `docker ps -f name=rodan_nginx -q` nginx -s reload

stop:
# This is the same command to stop docker swarm or docker-compose
# This is the same command to stop docker swarm or docker compose
@echo "[-] Stopping all running docker containers and services..."
@docker service rm `docker service ls -q` >>/dev/null 2>&1 || echo "[+] No Services Running"
# @docker stop `docker ps -aq` >>/dev/null 2>&1 || echo "[+] No Containers Running"
Expand Down Expand Up @@ -223,12 +225,12 @@ debug_swarm:

push:
@echo "[-] Pushing images to Docker Hub..."
@docker-compose push
@docker compose push
@echo "[+] Done."

pull:
@echo "[-] Pulling docker images from Docker Hub..."
@docker-compose pull
@docker compose pull
@echo "[+] Done."

$(JOBS_PATH)/neon_wrapper/Neon/package.json:
Expand Down
8 changes: 4 additions & 4 deletions arm-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- "resources:/rodan/data"

rodan-main:
image: "ddmal/rodan-main:nightly"
image: "ddmal/rodan-main:${DOCKER_TAG}"
healthcheck:
test: ["CMD-SHELL", "/usr/bin/curl -H 'User-Agent: docker-healthcheck' http://localhost:8000/api/?format=json || exit 1"]
interval: "10s"
Expand Down Expand Up @@ -41,7 +41,7 @@ services:


celery:
image: "ddmal/rodan-main:nightly"
image: "ddmal/rodan-main:${DOCKER_TAG}"
command: bash -c "tail -f /dev/null"
environment:
CELERY_JOB_QUEUE: celery
Expand All @@ -63,7 +63,7 @@ services:
- "./rodan-main/code:/code/Rodan"

py3-celery:
image: "ddmal/rodan-python3-celery:nightly"
image: "ddmal/rodan-python3-celery:${DOCKER_TAG}"
command: bash -c "tail -f /dev/null"
environment:
CELERY_JOB_QUEUE: Python3
Expand Down Expand Up @@ -92,7 +92,7 @@ services:
- postgres

postgres:
image: "ddmal/postgres-plpython:nightly"
image: "ddmal/postgres-plpython:${DOCKER_TAG}"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-U", "postgres"]
interval: 10s
Expand Down
2 changes: 1 addition & 1 deletion build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
context: ./iipsrv
dockerfile: Dockerfile
image: "ddmal/iipsrv:nightly"

rodan:
build:
context: .
Expand Down
8 changes: 4 additions & 4 deletions ci-jobs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ================================
# From ./python3-celery/Dockerfile
# ================================
FROM alpine:3 AS builder
FROM alpine:3.16 AS builder
ARG BRANCH
ENV BRANCH="${BRANCH:-develop}"
RUN apk update
Expand All @@ -23,13 +23,13 @@ RUN ./node_modules/.bin/gulp develop:rodan
WORKDIR /
RUN git clone --recurse-submodules -b "${BRANCH}" https://github.com/DDMAL/neon_wrapper
WORKDIR /neon_wrapper
RUN git submodule update --init
RUN git submodule update --remote
# RUN git submodule update --init
# RUN git submodule update --remote
RUN yarn install
RUN yarn build

# Make Gamera files accessible to the main container.
FROM ddmal/gamera4:v1.0.1 AS gamera
FROM ddmal/gamera4:fix_IC AS gamera

# This release is based on Debian 11 "Bullseye"
FROM python:3.7-slim
Expand Down
14 changes: 7 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.4"
services:
nginx:
image: "ddmal/nginx:nightly"
image: "ddmal/nginx:${DOCKER_TAG}"
command: /run/start
depends_on:
- celery
Expand All @@ -17,7 +17,7 @@ services:
- "resources:/rodan/data"

rodan-main:
image: "ddmal/rodan-main:nightly"
image: "ddmal/rodan-main:${DOCKER_TAG}"
healthcheck:
test: ["CMD-SHELL", "/usr/bin/curl -H 'User-Agent: docker-healthcheck' http://localhost:8000/api/?format=json || exit 1"]
interval: "10s"
Expand All @@ -44,7 +44,7 @@ services:
- "resources:/rodan/data"

celery:
image: "ddmal/rodan-main:nightly"
image: "ddmal/rodan-main:${DOCKER_TAG}"
command: bash -c "tail -f /dev/null"
environment:
CELERY_JOB_QUEUE: celery
Expand All @@ -66,7 +66,7 @@ services:
- "./rodan-main/code:/code/Rodan"

py3-celery:
image: "ddmal/rodan-python3-celery:nightly"
image: "ddmal/rodan-python3-celery:${DOCKER_TAG}"
command: bash -c "tail -f /dev/null"
environment:
CELERY_JOB_QUEUE: Python3
Expand All @@ -84,7 +84,7 @@ services:
- "./rodan-main/code:/code/Rodan"

gpu-celery:
image: "ddmal/rodan-gpu-celery:nightly"
image: "ddmal/rodan-gpu-celery:${DOCKER_TAG}"
command: bash -c "tail -f /dev/null"
environment:
CELERY_JOB_QUEUE: GPU
Expand All @@ -111,7 +111,7 @@ services:
- postgres

postgres:
image: "ddmal/postgres-plpython:nightly"
image: "ddmal/postgres-plpython:${DOCKER_TAG}"
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-U", "postgres"]
interval: 10s
Expand All @@ -133,7 +133,7 @@ services:
- ./scripts/local.env

hpc-rabbitmq:
image: "ddmal/hpc-rabbitmq:nightly"
image: "ddmal/hpc-rabbitmq:${DOCKER_TAG}"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: "30s"
Expand Down
5 changes: 5 additions & 0 deletions e2e/rodan_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ def build_hello_world_workflow(self, workflow) -> str:
workflow_dropdown = self.find_visible(
By.XPATH, '//*[@id="region-main"]//*[contains(text(), "Workflow")]'
)
workflow_dropdown = self.find_visible(
By.ID, "bs-example-navbar-collapse-1"
)
workflow_dropdown = workflow_dropdown.find_element(By.TAG_NAME, "ul")
workflow_dropdown = workflow_dropdown.find_element(By.TAG_NAME, "li")
workflow_dropdown.click()
# Click "Add Job".
add_job_button = self.find_visible(By.ID, "button-add_job")
Expand Down
8 changes: 6 additions & 2 deletions gpu-celery/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

ARG UBUNTU_VERSION=18.04
ARG CUDA=11.2
FROM nvidia/cuda${ARCH:+-$ARCH}:${CUDA}.1-base-ubuntu${UBUNTU_VERSION} as base
FROM nvidia/cuda${ARCH:+-$ARCH}:${CUDA}.2-base-ubuntu${UBUNTU_VERSION} as base
# ARCH and CUDA are specified again because the FROM directive resets ARGs
# (but their default value is retained if set previously)
ARG ARCH
Expand Down Expand Up @@ -141,10 +141,11 @@ RUN set -e \
RUN rm -rf /var/lib/apt/lists/*

# Bandaid fix for the cannot import name '_registerMatType' from 'cv2.cv2' issue
RUN pip uninstall opencv-python-headless && pip install opencv-python-headless==4.1.2.30
#RUN pip uninstall opencv-python-headless && pip install opencv-python-headless==4.1.2.30

# Install GPU Rodan Jobs
COPY ./scripts/install_gpu_rodan_jobs /opt/

# Install Rodan
# Runs on both Rodan service, and Rodan-Celery
COPY ./scripts/entrypoint /opt/
Expand Down Expand Up @@ -182,4 +183,7 @@ RUN set -x \
# Install Rodan.
RUN pip3 install -r /code/Rodan/requirements.txt

RUN pip3 uninstall -y opencv-python opencv-python-headless
RUN pip3 install opencv-python-headless==4.1.2.30

ENTRYPOINT ["/opt/entrypoint"]
Loading

0 comments on commit c578706

Please sign in to comment.