diff --git a/containers/mmm5-tax-day-compose.yaml b/containers/mmm5-tax-day-compose.yaml index 1fb7c6d..1f9f827 100644 --- a/containers/mmm5-tax-day-compose.yaml +++ b/containers/mmm5-tax-day-compose.yaml @@ -39,12 +39,11 @@ services: condition: service_started kmeans-gsas-agent: - image: ghcr.io/maffettone/bluesky-pods-bluesky:agents - command: uvicorn bluesky_adaptive.server:app --host 0.0.0.0 --root-path /kmeans-gsas-agent + image: gsas:conda + command: conda run -n GSASII --no-capture-output uvicorn bluesky_adaptive.server:app --host 0.0.0.0 --root-path /kmeans-gsas-agent environment: - TILED_API_KEY=$TILED_API_KEY - BS_AGENT_STARTUP_SCRIPT_PATH=/src/pdf-agents/pdf_agents/startup_scripts/mmm5-tax-day/kmeans-gsas.py - - PYTHONPATH=/src/pdf-agents volumes: - type: bind source: ../pdf_agents @@ -57,6 +56,22 @@ services: depends_on: gsas: condition: service_started + + kmeans-gsas-ui: + image: ghcr.io/maffettone/bluesky-adaptive-ui:latest + entrypoint: /modify_dns.sh + command: python3 /src/bluesky-adaptive-ui/bluesky_adaptive_ui/default_dash_app/app.py --agent-address kmeans-gsas-agent --agent-port 8000 + environment: + - DASH_REQUEST_PATHNAME_PREFIX=/kmeans-gsas/ + volumes: + - ./modify_dns.sh:/modify_dns.sh + - type: bind + source: ../../bluesky-adaptive-ui + target: /src/bluesky-adaptive-ui + read_only: true + depends_on: + gsas-agent: + condition: service_started proxy: image: docker.io/nginx diff --git a/containers/nginx/locs.d/kmeans-gsas.conf b/containers/nginx/locs.d/kmeans-gsas.conf index a83d763..bbcc1f7 100644 --- a/containers/nginx/locs.d/kmeans-gsas.conf +++ b/containers/nginx/locs.d/kmeans-gsas.conf @@ -1,3 +1,11 @@ +location /kmeans-gsas/ { + proxy_pass http://kmeans-gsas-ui:8050/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_read_timeout 60s; +} + location /kmeans-gsas-agent/ { proxy_pass http://kmeans-gsas-agent:8000/; proxy_set_header Host $host; @@ -5,3 +13,4 @@ location /kmeans-gsas-agent/ { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_read_timeout 60s; } +