From 0fc7ed4a6e30be100c8d6cf86dd7118678922954 Mon Sep 17 00:00:00 2001 From: lext Date: Sat, 14 Dec 2019 21:34:25 +0200 Subject: [PATCH] the images are pushed to dockerhub. Docker compose is not building any images anymore --- docker/docker-compose-cpu.yml | 12 +++--------- docker/docker-compose-gpu.yml | 17 +++++------------ rebuild_docker_images.sh | 8 +++++++- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/docker/docker-compose-cpu.yml b/docker/docker-compose-cpu.yml index 7983dc1..60c65cb 100644 --- a/docker/docker-compose-cpu.yml +++ b/docker/docker-compose-cpu.yml @@ -43,9 +43,7 @@ services: depends_on: - kneel - deepknee-backend - build: - context: ../deepknee-backend-broker - dockerfile: ../docker/BrokerDockerfile + image: "miptmloulu/deepknee:broker" container_name: backend-broker ports: - "5002:5002" @@ -62,13 +60,9 @@ services: - kneel - deepknee-backend - backend-broker - build: - context: ../deepknee-frontend - dockerfile: ../docker/UIDockerfile - args: - - REACT_APP_BROKER_PORT=5002 + image: "miptmloulu/deepknee:ui" container_name: ui ports: - "5003:5003" working_dir: /usr/src/app/ - entrypoint: ["react-scripts", "start"] ##["serve", "-l", "5003", "-s", "/usr/src/app/build"] + entrypoint: ["serve", "-l", "5003", "-s", "/usr/src/app/build"] diff --git a/docker/docker-compose-gpu.yml b/docker/docker-compose-gpu.yml index df81d00..0e26281 100644 --- a/docker/docker-compose-gpu.yml +++ b/docker/docker-compose-gpu.yml @@ -18,7 +18,8 @@ services: "--lc_snapshot_path", "/snapshots/lext-devbox_2019_07_14_16_04_41", "--hc_snapshot_path", "/snapshots/lext-devbox_2019_07_14_19_25_40", "--refine", "True", "--mean_std_path", "/snapshots/mean_std.npy", - "--deploy", "True", "--device", "cuda", "--port", "5000", "--logs", "/logs/kneel-gpu.log"] + "--deploy", "True", "--device", "cuda", + "--port", "5000", "--logs", "/logs/kneel-gpu.log"] deepknee-backend: runtime: nvidia depends_on: @@ -46,9 +47,7 @@ services: depends_on: - kneel - deepknee-backend - build: - context: ../deepknee-backend-broker - dockerfile: ../docker/BrokerDockerfile + image: "miptmloulu/deepknee:broker" container_name: backend-broker ports: - "5002:5002" @@ -65,14 +64,8 @@ services: - kneel - deepknee-backend - backend-broker - build: - context: ../deepknee-frontend - dockerfile: ../docker/UIDockerfile - args: - - REACT_APP_BROKER_PORT=5002 - environment: - - PORT=5003 + image: "miptmloulu/deepknee:ui" container_name: ui ports: - "5003:5003" - entrypoint: ["react-scripts", "start"] ##["serve", "-l", "5003", "-s", "/usr/src/app/build"] + entrypoint: ["serve", "-l", "5003", "-s", "/usr/src/app/build"] diff --git a/rebuild_docker_images.sh b/rebuild_docker_images.sh index 8df38ed..49e3f95 100644 --- a/rebuild_docker_images.sh +++ b/rebuild_docker_images.sh @@ -1,7 +1,13 @@ #!/usr/bin/env bash +# This script must be built on a linux machine + # DeepKnee REST microservice images docker build -t miptmloulu/deepknee:gpu -f docker/Dockerfile.gpu . docker build -t miptmloulu/deepknee:cpu -f docker/Dockerfile.cpu . +docker build --build-arg REACT_APP_BROKER_PORT=5002 -t miptmloulu/deepknee:ui -f docker/UIDockerfile deepknee-frontend +docker build -t miptmloulu/deepknee:broker -f docker/BrokerDockerfile deepknee-backend-broker + +# Frontend and Backend docker push miptmloulu/deepknee:cpu && docker push miptmloulu/deepknee:gpu +docker push miptmloulu/deepknee:broker && docker push miptmloulu/deepknee:ui -# Frontend and Backend broker \ No newline at end of file