Realcat commited on
Commit
4d1f87b
Β·
1 Parent(s): 30903a6

fix: no images

Browse files
Files changed (3) hide show
  1. build_docker.sh +21 -3
  2. docker/run_docker.sh +1 -1
  3. imcui/ui/utils.py +5 -2
build_docker.sh CHANGED
@@ -1,3 +1,21 @@
1
- docker build -t image-matching-webui:latest . --no-cache
2
- docker tag image-matching-webui:latest vincentqin/image-matching-webui:latest
3
- docker push vincentqin/image-matching-webui:latest
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 run -it -p 7860:7860 vincentqin/image-matching-webui:latest python app.py --server_name "0.0.0.0" --server_port=7860
 
1
+ docker-compose up # start all
imcui/ui/utils.py CHANGED
@@ -828,8 +828,7 @@ def generate_fake_outputs(
828
  )
829
 
830
 
831
- # @spaces.GPU(duration=60)
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