Samad14 commited on
Commit
3df6abc
·
1 Parent(s): 7013a36

fix: switch Render to Python buildpack with build.sh (openbabel via wheel, vina/phyml via wget)

Browse files

- Replaced runtime: docker (unusable on existing Python service) with runtime: python
- build.sh: pip install openbabel-wheel (provides obabel CLI), wget vina + phyml
- Removed dockerfilePath (not valid for Python runtime)
- render.yaml back to buildCommand + startCommand pattern

Files changed (2) hide show
  1. bioai-platform/backend/build.sh +21 -0
  2. render.yaml +2 -1
bioai-platform/backend/build.sh ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ echo "==> Installing openbabel CLI via openbabel-wheel"
5
+ pip install openbabel-wheel
6
+
7
+ echo "==> Installing AutoDock Vina"
8
+ wget -q "https://github.com/ccsb-scripps/AutoDock-Vina/releases/download/v1.2.7/vina_1.2.7_linux_x86_64" -O /usr/local/bin/vina
9
+ chmod +x /usr/local/bin/vina
10
+
11
+ echo "==> Installing PhyML"
12
+ wget -qO /tmp/phyml.tar.bz2 "https://anaconda.org/bioconda/phyml/3.3.20220408/download/linux-64/phyml-3.3.20220408-h9bc3f66_3.tar.bz2"
13
+ tar xjf /tmp/phyml.tar.bz2 -C /tmp
14
+ cp /tmp/bin/phyml /usr/local/bin/phyml
15
+ chmod +x /usr/local/bin/phyml
16
+ rm -rf /tmp/phyml.tar.bz2 /tmp/bin
17
+
18
+ echo "==> Installing Python dependencies"
19
+ pip install -r requirements.txt
20
+
21
+ echo "==> Build complete"
render.yaml CHANGED
@@ -4,7 +4,8 @@ services:
4
  runtime: python
5
  region: ohio
6
  rootDir: bioai-platform/backend
7
- dockerfilePath: ./Dockerfile
 
8
  healthCheckPath: /health
9
  envVars:
10
  - key: SUPABASE_URL
 
4
  runtime: python
5
  region: ohio
6
  rootDir: bioai-platform/backend
7
+ buildCommand: bash build.sh
8
+ startCommand: uvicorn app.main:app --host 0.0.0.0 --port $PORT
9
  healthCheckPath: /health
10
  envVars:
11
  - key: SUPABASE_URL