Spaces:
Sleeping
Sleeping
docker containers
Browse files- docker-compose.yml +31 -0
docker-compose.yml
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version: "3.9"
|
| 2 |
+
|
| 3 |
+
services:
|
| 4 |
+
api:
|
| 5 |
+
build:
|
| 6 |
+
context: ./backend
|
| 7 |
+
dockerfile: Dockerfile
|
| 8 |
+
container_name: smart_contract_auditor_api
|
| 9 |
+
ports:
|
| 10 |
+
- "8000:8000"
|
| 11 |
+
environment:
|
| 12 |
+
- HF_MODEL_ID=${HF_MODEL_ID:-}
|
| 13 |
+
- HF_TOKEN=${HF_TOKEN:-}
|
| 14 |
+
- USE_PATTERN_FALLBACK=true
|
| 15 |
+
- MAX_NEW_TOKENS=300
|
| 16 |
+
- TEMPERATURE=0.7
|
| 17 |
+
volumes:
|
| 18 |
+
- ./models:/app/models # mount local model weights (optional)
|
| 19 |
+
restart: unless-stopped
|
| 20 |
+
|
| 21 |
+
# Optional: serve the frontend locally
|
| 22 |
+
frontend:
|
| 23 |
+
image: nginx:alpine
|
| 24 |
+
container_name: smart_contract_auditor_ui
|
| 25 |
+
ports:
|
| 26 |
+
- "3000:80"
|
| 27 |
+
volumes:
|
| 28 |
+
- ./frontend:/usr/share/nginx/html:ro
|
| 29 |
+
depends_on:
|
| 30 |
+
- api
|
| 31 |
+
restart: unless-stopped
|