Spaces:
Sleeping
Sleeping
Commit
·
b0adefd
1
Parent(s):
d1db5b9
Update scripts
Browse files- build_and_push.sh +25 -0
- launch_space.sh +2 -2
build_and_push.sh
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Check if version number is provided
|
| 4 |
+
if [ -z "$1" ]; then
|
| 5 |
+
echo "Please provide a version number (e.g., 1.0.0)"
|
| 6 |
+
exit 1
|
| 7 |
+
fi
|
| 8 |
+
|
| 9 |
+
VERSION=$1
|
| 10 |
+
IMAGE_NAME="syzygianinfern0/stormbase"
|
| 11 |
+
|
| 12 |
+
# Build the Docker image with version tag
|
| 13 |
+
echo "Building Docker image with version $VERSION..."
|
| 14 |
+
docker build -f Dockerfile.stormbase -t $IMAGE_NAME:$VERSION .
|
| 15 |
+
|
| 16 |
+
# Tag as latest
|
| 17 |
+
echo "Tagging as latest..."
|
| 18 |
+
docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:latest
|
| 19 |
+
|
| 20 |
+
# Push both tags to Docker Hub
|
| 21 |
+
echo "Pushing to Docker Hub..."
|
| 22 |
+
docker push $IMAGE_NAME:$VERSION
|
| 23 |
+
docker push $IMAGE_NAME:latest
|
| 24 |
+
|
| 25 |
+
echo "Done! Image $IMAGE_NAME:$VERSION has been built and pushed to Docker Hub"
|
launch_space.sh
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
# Start vLLM server in background
|
| 4 |
-
./vllm_serve.sh
|
| 5 |
|
| 6 |
# Wait briefly to ensure vLLM is up before Gradio tries to connect
|
| 7 |
sleep 60
|
| 8 |
|
| 9 |
# Start Gradio app
|
| 10 |
-
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
# Start vLLM server in background
|
| 4 |
+
./vllm_serve.sh &
|
| 5 |
|
| 6 |
# Wait briefly to ensure vLLM is up before Gradio tries to connect
|
| 7 |
sleep 60
|
| 8 |
|
| 9 |
# Start Gradio app
|
| 10 |
+
python3 evaluate_demo.py
|