Spaces:
Running
on
Zero
Running
on
Zero
fix: no images
Browse files- build_docker.sh +21 -3
- docker/run_docker.sh +1 -1
- imcui/ui/utils.py +5 -2
build_docker.sh
CHANGED
@@ -1,3 +1,21 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
# build_docker.sh
|
3 |
+
|
4 |
+
IMAGE_NAME="vincentqin/image-matching-webui"
|
5 |
+
VERSION="latest"
|
6 |
+
|
7 |
+
echo "π¨ Building image..."
|
8 |
+
docker build -t $IMAGE_NAME:$VERSION .
|
9 |
+
|
10 |
+
echo "π Tagging versions..."
|
11 |
+
# tagging to easily use
|
12 |
+
docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:$(date +%Y%m%d)
|
13 |
+
|
14 |
+
echo "π Pushing to Docker Hub..."
|
15 |
+
docker push $IMAGE_NAME:$VERSION
|
16 |
+
docker push $IMAGE_NAME:$(date +%Y%m%d)
|
17 |
+
|
18 |
+
echo "β
Push completed!"
|
19 |
+
echo "π Usage:"
|
20 |
+
echo " docker run -p 7860:7860 $IMAGE_NAME:$VERSION"
|
21 |
+
echo "π Docker Hub: https://hub.docker.com/repository/docker/vincentqin/image-matching-webui"
|
docker/run_docker.sh
CHANGED
@@ -1 +1 @@
|
|
1 |
-
docker
|
|
|
1 |
+
docker-compose up # start all
|
imcui/ui/utils.py
CHANGED
@@ -828,8 +828,7 @@ def generate_fake_outputs(
|
|
828 |
)
|
829 |
|
830 |
|
831 |
-
|
832 |
-
@spaces.GPU()
|
833 |
def run_matching(
|
834 |
image0: np.ndarray,
|
835 |
image1: np.ndarray,
|
@@ -891,9 +890,13 @@ def run_matching(
|
|
891 |
logger.error(
|
892 |
"Error: No images found! Please upload two images or select an example."
|
893 |
)
|
|
|
|
|
|
|
894 |
raise gr.Error(
|
895 |
"Error: No images found! Please upload two images or select an example."
|
896 |
)
|
|
|
897 |
# init output
|
898 |
output_keypoints = None
|
899 |
output_matches_raw = None
|
|
|
828 |
)
|
829 |
|
830 |
|
831 |
+
@spaces.GPU(duration=35)
|
|
|
832 |
def run_matching(
|
833 |
image0: np.ndarray,
|
834 |
image1: np.ndarray,
|
|
|
890 |
logger.error(
|
891 |
"Error: No images found! Please upload two images or select an example."
|
892 |
)
|
893 |
+
yield generate_fake_outputs(
|
894 |
+
None, None, None, {}, {}, {}
|
895 |
+
)
|
896 |
raise gr.Error(
|
897 |
"Error: No images found! Please upload two images or select an example."
|
898 |
)
|
899 |
+
|
900 |
# init output
|
901 |
output_keypoints = None
|
902 |
output_matches_raw = None
|