Skip to content

Commit

Permalink
Create a temporal folder for the QR code detection output (useful for…
Browse files Browse the repository at this point in the history
… docker image, otherwise it fails since it can't create the folder because it doesn't have permissions).
  • Loading branch information
pablospe committed Feb 12, 2024
1 parent 055c155 commit 02cdbdd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
run: |
DATE=$(date +%Y-%m-%d)
docker build . --tag ghcr.io/microsoft/lamar-benchmark/scantools:$DATE --target scantools
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
# if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
docker tag ghcr.io/microsoft/lamar-benchmark/scantools:$DATE \
ghcr.io/microsoft/lamar-benchmark/scantools:latest
docker push ghcr.io/microsoft/lamar-benchmark/scantools:$DATE
docker push ghcr.io/microsoft/lamar-benchmark/scantools:latest
fi
# fi
- name: Build and push Lamar Docker image
run: |
Expand Down
9 changes: 7 additions & 2 deletions pipelines/pipeline_navvis_rig.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import argparse
import shutil
import tempfile
from pathlib import Path
from typing import List, Optional

Expand Down Expand Up @@ -105,7 +106,7 @@ def run(
visualization: bool = True,
**kargs,
):
capture_path = output_path or Path.cwd()
capture_path = output_path or Path.cwd() / "lamar-capture-format"

if capture_path.exists():
capture = Capture.load(capture_path)
Expand Down Expand Up @@ -155,7 +156,11 @@ def run(
run_rendering.run(capture, session, mesh_id=mesh_id)

if qrcode_detection:
capture_qrcode_path = Path(capture_path.as_posix() + "-qrcode")
capture_qrcode_path = Path(tempfile.mkdtemp())
logger.info(
"Create a temporal folder for the QR code detection output %s.",
capture_qrcode_path,
)
capture_qrcode_path.mkdir(exist_ok=True, parents=True)
capture_qrcode = Capture(sessions={}, path=capture_qrcode_path)

Expand Down

0 comments on commit 02cdbdd

Please sign in to comment.