Skip to content

Commit

Permalink
enh: depends on gsas base image add kmeans ui
Browse files Browse the repository at this point in the history
  • Loading branch information
maffettone committed Apr 11, 2024
1 parent 7fcd880 commit dfa76d4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
21 changes: 18 additions & 3 deletions containers/mmm5-tax-day-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
9 changes: 9 additions & 0 deletions containers/nginx/locs.d/kmeans-gsas.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
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;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 60s;
}

0 comments on commit dfa76d4

Please sign in to comment.