From ec769df7de8ff8f65a8d11f70509cca5a6ab008f Mon Sep 17 00:00:00 2001 From: Vinicius Vaz Date: Thu, 12 Oct 2023 11:16:41 -0300 Subject: [PATCH] compose cli with new dev flag and fix dockerfile --- frontend/Dockerfile.dev | 2 ++ src/domino/cli/utils/docker-compose.yaml | 8 ++++---- src/domino/cli/utils/platform.py | 8 +++++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/frontend/Dockerfile.dev b/frontend/Dockerfile.dev index ea79ea89..360cff5a 100644 --- a/frontend/Dockerfile.dev +++ b/frontend/Dockerfile.dev @@ -10,6 +10,8 @@ WORKDIR /usr/src/app COPY --chown=node:node . /usr/src/app RUN mkdir -p node_modules/.cache RUN chmod -R 777 node_modules/.cache +RUN mkdir -p node_modules/.vite +RUN chmod -R 777 node_modules/.vite RUN yarn install --frozen-lockfile && yarn cache clean diff --git a/src/domino/cli/utils/docker-compose.yaml b/src/domino/cli/utils/docker-compose.yaml index a04eb936..2dcc4ecf 100644 --- a/src/domino/cli/utils/docker-compose.yaml +++ b/src/domino/cli/utils/docker-compose.yaml @@ -224,7 +224,7 @@ services: # Modified Airflow Scheduler with Domino airflow-scheduler: <<: *airflow-common - image: ghcr.io/tauffer-consulting/domino-airflow-base${DOMINO_COMPOSE_DEV}:latest + image: ghcr.io/tauffer-consulting/domino-airflow-base:latest${DOMINO_COMPOSE_DEV} container_name: airflow-domino-scheduler command: scheduler healthcheck: @@ -255,7 +255,7 @@ services: # Modified Airflow Worker with Domino airflow-worker: <<: *airflow-common - image: ghcr.io/tauffer-consulting/domino-airflow-base${DOMINO_COMPOSE_DEV}:latest + image: ghcr.io/tauffer-consulting/domino-airflow-base:latest${DOMINO_COMPOSE_DEV} container_name: airflow-domino-worker command: celery worker healthcheck: @@ -287,7 +287,7 @@ services: # Domino REST Api domino_rest: - image: ghcr.io/tauffer-consulting/domino-rest${DOMINO_COMPOSE_DEV}:latest + image: ghcr.io/tauffer-consulting/domino-rest:latest${DOMINO_COMPOSE_DEV} container_name: domino-rest command: bash -c "alembic upgrade heads && uvicorn main:app --reload --workers 1 --host 0.0.0.0 --port 8000" ports: @@ -339,7 +339,7 @@ services: # Domino Frontend domino_frontend: - image: ghcr.io/tauffer-consulting/domino-frontend${DOMINO_COMPOSE_DEV}:compose + image: ghcr.io/tauffer-consulting/domino-frontend:compose${DOMINO_COMPOSE_DEV} container_name: domino-frontend ports: - "3000:80" diff --git a/src/domino/cli/utils/platform.py b/src/domino/cli/utils/platform.py index 03b3762f..5a5db23a 100644 --- a/src/domino/cli/utils/platform.py +++ b/src/domino/cli/utils/platform.py @@ -234,6 +234,8 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None console.print(f"Loading local Domino Airflow image {local_domino_airflow_image} to Kind cluster...") subprocess.run(["kind", "load", "docker-image", local_domino_airflow_image , "--name", cluster_name, "--nodes", f"{cluster_name}-worker"]) domino_airflow_image = f'docker.io/library/{local_domino_airflow_image}' + elif platform_config['kind']["DOMINO_DEPLOY_MODE"] == 'local-k8s-dev': + domino_airflow_image = "ghcr.io/tauffer-consulting/domino-airflow-base:latest-dev" else: domino_airflow_image = "ghcr.io/tauffer-consulting/domino-airflow-base:latest" @@ -241,6 +243,8 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None console.print(f"Loading local frontend image {local_domino_frontend_image} to Kind cluster...") subprocess.run(["kind", "load", "docker-image", local_domino_frontend_image , "--name", cluster_name, "--nodes", f"{cluster_name}-worker"]) domino_frontend_image = f"docker.io/library/{local_domino_frontend_image}" + elif platform_config['kind']["DOMINO_DEPLOY_MODE"] == 'local-k8s-dev': + domino_frontend_image = "ghcr.io/tauffer-consulting/domino-frontend:k8s-dev" else: domino_frontend_image = "ghcr.io/tauffer-consulting/domino-frontend:k8s" @@ -248,7 +252,9 @@ def create_platform(install_airflow: bool = True, use_gpu: bool = False) -> None console.print(f"Loading local REST image {local_domino_rest_image} to Kind cluster...") subprocess.run(["kind", "load", "docker-image", local_domino_rest_image , "--name", cluster_name, "--nodes", f"{cluster_name}-worker"]) domino_rest_image = f'docker.io/library/{local_domino_rest_image}' - else: + elif platform_config['kind']["DOMINO_DEPLOY_MODE"] == 'local-k8s-dev': + domino_rest_image = "ghcr.io/tauffer-consulting/domino-rest:latest-dev" + else: domino_rest_image = "ghcr.io/tauffer-consulting/domino-rest:latest" # In order to use nvidia gpu in our cluster we need nvidia plugins to be installed.