From 50ccd8524d374eb292ad0f107a4b5702611114b2 Mon Sep 17 00:00:00 2001 From: Akihiko Kuroda Date: Sat, 20 May 2023 18:11:05 -0400 Subject: [PATCH 1/2] clean up after dockerfile merge --- Makefile | 10 -- docker-compose-dev-arm64.yml | 151 ------------------ docker-compose-dev.yml | 2 + .../docker/Dockerfile-ray-qiskit-arm64 | 10 -- 4 files changed, 2 insertions(+), 171 deletions(-) delete mode 100644 docker-compose-dev-arm64.yml delete mode 100644 infrastructure/docker/Dockerfile-ray-qiskit-arm64 diff --git a/Makefile b/Makefile index 142b79276..5ccdf5061 100644 --- a/Makefile +++ b/Makefile @@ -47,13 +47,3 @@ push-gateway: push-repository-server: docker push $(repositoryServerImageName):$(version) - -compose-up: -ifeq ($(arch),arm) - docker-compose -f docker-compose-dev-arm64.yml --profile full up -else - docker-compose -f docker-compose-dev.yml --profile full up -endif - -compose-down: - docker-compose down diff --git a/docker-compose-dev-arm64.yml b/docker-compose-dev-arm64.yml deleted file mode 100644 index 1433b95ef..000000000 --- a/docker-compose-dev-arm64.yml +++ /dev/null @@ -1,151 +0,0 @@ -# compose config for running images based on local files -services: - jupyter: - container_name: qs-jupyter - build: - context: ./ - dockerfile: infrastructure/docker/Dockerfile-notebook - profiles: ["jupyter", "full"] - ports: - - 8888:8888 - environment: - - JUPYTER_TOKEN=123 - - GATEWAY_HOST=http://gateway:8000 - networks: - - safe-tier - ray-head: - container_name: ray-head - build: - context: ./ - dockerfile: infrastructure/docker/Dockerfile-ray-qiskit-arm64 - entrypoint: [ - "env", "RAY_LOG_TO_STDERR=1", "ray", "start", "--head", "--port=6379", - "--dashboard-host=0.0.0.0", "--block" - ] - environment: - - OT_JAEGER_HOST_KEY=jaeger - ports: - - 8265:8265 - privileged: true - volumes: - - /dev/shm:/dev/shm - networks: - - safe-tier - postgres: - image: postgres - environment: - POSTGRES_DB: testkeycloakdb - POSTGRES_USER: testkeycloakuser - POSTGRES_PASSWORD: testkeycloakpassword - networks: - - safe-tier - restart: - always - keycloak: - container_name: keycloak - image: bitnami/keycloak:20.0.5-debian-11-r4 - volumes: - - ./realm-export.json:/opt/keycloak/data/import/realm-export.json - environment: - KEYCLOAK_DATABASE_HOST: postgres - KEYCLOAK_DATABASE_NAME: testkeycloakdb - KEYCLOAK_DATABASE_USER: testkeycloakuser - KEYCLOAK_DATABASE_SCHEMA: public - KEYCLOAK_DATABASE_PASSWORD: testkeycloakpassword - KEYCLOAK_ADMIN_USER: admin - KEYCLOAK_ADMIN_PASSWORD: 123 - KEYCLOAK_HTTP_PORT: 8080 - KEYCLOAK_EXTRA_ARGS: "-Dkeycloak.import=/opt/keycloak/data/import/realm-export.json" - ports: - - 8085:8080 - depends_on: - - postgres - networks: - - safe-tier - restart: - always - gateway: - container_name: gateway - build: - context: ./ - dockerfile: infrastructure/docker/Dockerfile-gateway - command: gunicorn main.wsgi:application --bind 0.0.0.0:8000 --workers=4 - ports: - - 8000:8000 - environment: - - DEBUG=1 - - RAY_HOST=http://ray-head:8265 - - CLIENT_ID=gateway-client - - DJANGO_SUPERUSER_USERNAME=admin - - DJANGO_SUPERUSER_PASSWORD=123 - - DJANGO_SUPERUSER_EMAIL=admin@noemail.com - - SETTING_KEYCLOAK_URL=http://keycloak:8080 - - SETTING_KEYCLOAK_REALM=quantumserverless - - SETTINGS_KEYCLOAK_CLIENT_SECRET=supersecret - - SITE_HOST=http://gateway:8000 - networks: - - safe-tier - depends_on: - - keycloak - repository-server: - container_name: repository-server - build: - context: ./ - dockerfile: infrastructure/docker/Dockerfile-repository-server - profiles: [ "full" ] - command: gunicorn main.wsgi:application --bind 0.0.0.0:8060 --workers=4 - ports: - - 8060:8060 - environment: - - DEBUG=0 - - DJANGO_SUPERUSER_USERNAME=admin - - DJANGO_SUPERUSER_PASSWORD=123 - - DJANGO_SUPERUSER_EMAIL=admin@noemail.com - - DATABASE_HOST=repository-postgres - - DATABASE_PORT=5432 - - DATABASE_NAME=repository_db - - DATABASE_USER=repository_user - - DATABASE_PASSWORD=repository_password - networks: - - safe-tier - repository-postgres: - image: postgres - profiles: [ "full" ] - environment: - POSTGRES_DB: repository_db - POSTGRES_USER: repository_user - POSTGRES_PASSWORD: repository_password - networks: - - safe-tier - restart: - always - prometheus: - image: prom/prometheus:v2.43.0 - profiles: [ "full" ] - ports: - - 9000:9090 - loki: - image: grafana/loki:2.7.5 - profiles: [ "full" ] - ports: - - 3100:3100 - command: -config.file=/etc/loki/local-config.yaml - networks: - - safe-tier - promtail: - image: grafana/promtail:2.7.4 - profiles: [ "full" ] - volumes: - - /var/log:/var/log - command: -config.file=/etc/promtail/config.yml - networks: - - safe-tier - grafana: - image: grafana/grafana:latest - profiles: [ "full" ] - ports: - - 3000:3000 - networks: - - safe-tier -networks: - safe-tier: diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index a45866e52..440272cf4 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -18,6 +18,8 @@ services: build: context: ./ dockerfile: infrastructure/docker/Dockerfile-ray-qiskit + args: + TARGETARCH: entrypoint: [ "env", "RAY_LOG_TO_STDERR=1", "ray", "start", "--head", "--port=6379", "--dashboard-host=0.0.0.0", "--block" diff --git a/infrastructure/docker/Dockerfile-ray-qiskit-arm64 b/infrastructure/docker/Dockerfile-ray-qiskit-arm64 deleted file mode 100644 index 6e3f71adb..000000000 --- a/infrastructure/docker/Dockerfile-ray-qiskit-arm64 +++ /dev/null @@ -1,10 +0,0 @@ -ARG IMAGE_PY_VERSION=py39 -FROM rayproject/ray:2.4.0-$IMAGE_PY_VERSION-aarch64 -USER $RAY_UID - -RUN apt-get -y update && apt-get -y install gcc build-essential libopenblas-dev cmake -COPY --chown=$RAY_UID:$RAY_UID ./client ./qs -RUN cd ./qs && pip install . -RUN pip install git+https://github.com/pyscf/pyscf@v2.2.1 -RUN cd ../ -RUN rm -r ./qs From f25a69573cfeafb4f766d0820d2a63a90dcf7099 Mon Sep 17 00:00:00 2001 From: Akihiko Kuroda Date: Mon, 22 May 2023 09:08:13 -0400 Subject: [PATCH 2/2] update docker-compose-dev.yml Signed-off-by: Akihiko Kuroda --- docker-compose-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 440272cf4..7d97d4c8a 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -19,7 +19,7 @@ services: context: ./ dockerfile: infrastructure/docker/Dockerfile-ray-qiskit args: - TARGETARCH: + TARGETARCH: "${TARGETARCH:-amd64}" entrypoint: [ "env", "RAY_LOG_TO_STDERR=1", "ray", "start", "--head", "--port=6379", "--dashboard-host=0.0.0.0", "--block"