File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,15 +43,15 @@ Face URL — the container downloads it on first run.
4343
4444``` bash
4545# build once (make sure you build from computervisionaihub directory)
46- docker build -t computervisionaihub ./inference
46+ docker build -t computervisionaihub:1.0 ./inference
4747
4848# CLI: annotate one image
49- docker run -v $( pwd) :/data computervisionaihub \
49+ docker run -v $( pwd) :/data computervisionaihub:1.0 \
5050 https://huggingface.co/youruser/yourmodel/resolve/main/best.pt \
5151 /data/test.jpg
5252
5353# web UI: drag-and-drop at http://localhost:7860
54- docker run -p 7860:7860 --entrypoint python computervisionaihub app.py
54+ docker run -p 7860:7860 --entrypoint python computervisionaihub:1.0 app.py
5555```
5656
5757## For maintainers: add a model
Original file line number Diff line number Diff line change 44 The page never hardcodes models; it all comes from the manifest.
55 ============================================================ */
66
7- // Change this to your GHCR/Docker Hub image.
8- const DOCKER_IMAGE = "docker.io/lukasiktar/computervisionaihub" ;
9-
107// Module-level state
118let ALL_MODELS = [ ] ;
129let activeTask = "all" ;
@@ -103,9 +100,6 @@ function card(m) {
103100 </div>` ;
104101 } ;
105102
106- const runCmd =
107- `docker run -v $(pwd):/data ${ DOCKER_IMAGE } ${ m . download } /data/test.jpg` ;
108-
109103 const imageBlock = m . image
110104 ? `<div class="card-image">
111105 <img src="${ esc ( m . image ) } " alt="Example detections from ${ esc ( m . name ) } " loading="lazy"
@@ -156,14 +150,6 @@ function card(m) {
156150 <code>${ esc ( m . download ) } </code>
157151 </div>
158152 </div>
159-
160- <div class="run-group">
161- <span class="run-label">Run via CLI</span>
162- <div class="run">
163- <button class="copy-btn" data-cmd="${ esc ( runCmd ) } ">copy</button>
164- <code>${ esc ( runCmd ) } </code>
165- </div>
166- </div>
167153 </article>` ;
168154}
169155
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ <h2>Run the visual UI locally</h2>
4040 < p > Pulls the image if it's not cached, starts the app, and serves a drag-and-drop UI on < code > localhost:7860</ code > . Requires Docker.</ p >
4141 </ div >
4242 < div class ="run launch-run ">
43- < button class ="copy-btn " id ="launch-copy " data-cmd ="docker run -p 7860:7860 -v $(pwd)/inference:/app -- entrypoint python docker.io/lukasiktar/computervisionaihub app.py "> copy</ button >
44- < code id ="launch-cmd "> docker run -p 7860:7860 --entrypoint python docker.io/lukasiktar/computervisionaihub app.py</ code >
43+ < button class ="copy-btn " id ="launch-copy " data-cmd ="docker run -p 7860:7860 -- entrypoint python docker.io/lukasiktar/computervisionaihub:latest app.py "> copy</ button >
44+ < code id ="launch-cmd "> docker run -p 7860:7860 --entrypoint python docker.io/lukasiktar/computervisionaihub:latest app.py</ code >
4545 </ div >
4646 < a class ="btn primary " href ="http://localhost:7860 " target ="_blank " rel ="noopener "> Open localhost:7860 →</ a >
4747 </ section >
Original file line number Diff line number Diff line change 446446 "onnx" : " https://huggingface.co/lukasiktar11/license-place-ocr-detector3/resolve/main/best.onnx" ,
447447 "size_mb" : 44.1 ,
448448 "image_size" : 640 ,
449- "image" :" assets/previews/LicensePlateOCRDetection2 .jpg"
449+ "image" :" assets/previews/LicensePlateOCRDetection3 .jpg"
450450 },
451451 {
452452 "id" : " road-line-segmentator" ,
Original file line number Diff line number Diff line change 11# ComputerVisionAIHub local inference image.
22#
33# Build:
4- # docker build -t computervisionaihub ./inference
4+ # docker build -t computervisionaihub:1.0 ./inference
55#
66# Run the CLI (replace <MODEL_URL> and test.jpg with your own):
7- # docker run -v $(pwd):/data computervisionaihub <MODEL_URL> /data/test.jpg
7+ # docker run -v $(pwd):/data computervisionaihub:1.0 <MODEL_URL> /data/test.jpg
88#
99# Run the web UI instead (drag-and-drop on http://localhost:7860):
10- # docker run -p 7860:7860 -v $(pwd)/inference:/app -- entrypoint python docker.io/lukasiktar/ computervisionaihub app.py
10+ # docker run -p 7860:7860 -- entrypoint python computervisionaihub:1.0 app.py
1111
1212
1313FROM python:3.11-slim
@@ -22,8 +22,9 @@ WORKDIR /app
2222COPY requirements.txt .
2323RUN pip install --no-cache-dir -r requirements.txt
2424
25+
2526COPY detect.py .
2627COPY app.py .
2728
2829# Default: CLI inference. Override --entrypoint for the web UI (see header).
29- ENTRYPOINT ["python" , "detect.py" ]
30+ ENTRYPOINT ["python" , "detect.py" ]
You can’t perform that action at this time.
0 commit comments