Skip to content

Commit

Permalink
adds slide for nvidiaCAGX-model-deployment #36
Browse files Browse the repository at this point in the history
  • Loading branch information
mxochicale committed Nov 15, 2023
1 parent 7727c63 commit 89eca10
Show file tree
Hide file tree
Showing 7 changed files with 451 additions and 0 deletions.
55 changes: 55 additions & 0 deletions slides/figures/model-nvigia-deployment/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

OS_VERSION:=$(shell lsb_release -a 2>/dev/null | grep Description | awk '{ print $$2 "-" $$3 }')
$(eval $(shell grep VERSION_ID /etc/os-release))
#ifeq ($(VERSION_ID), 22.04)
ifeq ($(OS_VERSION), Ubuntu-22.04.1)
EXPORT_ID = --export-png
else
EXPORT_ID = --export-filename
endif
# https://stackoverflow.com/questions/714100/os-detecting-makefile

INKSCAPE?=inkscape --export-dpi=200 $(EXPORT_ID)


#dPDFSETTINGS=screen #lower quality, smaller size. (72 dpi)
#dPDFSETTINGS=ebook #for better quality, but slightly larger pdfs. (150 dpi)
#dPDFSETTINGS=prepress #output similar to Acrobat Distiller "Prepress Optimized" setting (300 dpi)
#dPDFSETTINGS=printer #selects output similar to the Acrobat Distiller "Print Optimized" setting (300 dpi)
dPDFSETTINGS=default #selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file

GS?=gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/$(dPDFSETTINGS) -dNOPAUSE -dQUIET -dBATCH -sOutputFile=

FIGURES_SVG=$(wildcard vectors/*.svg)
FIGURES_PNG=$(subst vectors/,outputs/,$(FIGURES_SVG:.svg=.png))
FIGURES_PDF=$(subst vectors/,outputs/,$(FIGURES_SVG:.svg=.pdf))
FIGURES_PDF_REDUCED_SIZE=$(subst vectors/,outputs/,$(FIGURES_SVG:.svg=_reduced_size.pdf))

# Pattern rule for converting SVG to PNG and PDF
png: $(FIGURES_PNG)
outputs/%.png: vectors/%.svg
$(INKSCAPE) $(@) $(<)

pdf: $(FIGURES_PDF)
outputs/%.pdf: vectors/%.svg
$(INKSCAPE) $(@) $(<)

edit:
inkscape $(FIGURES_SVG)

view-png:
eog $(FIGURES_PNG)

view-pdf:
evince $(FIGURES_PDF)

reduce-pdf-size:
$(GS)$(FIGURES_PDF_REDUCED_SIZE) $(FIGURES_PDF)

clean: ## output figure files
rm -f $(FIGURES_PNG) $(FIGURES_PDF) outputs/*.pdf

test:
echo $(VERSION_ID)
echo $(OS_VERSION)
echo $(EXPORT_ID)
44 changes: 44 additions & 0 deletions slides/figures/model-nvigia-deployment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Vector figures

## Notes

## Usage
```
make png
make pdf
make view-png #eog *.png
make view-pdf #evince *.pdf
make reduce-pdf-size dPDFSETTING=book # screen, ebook, prepress, printer and default
make edit # inkscape vector/drawing-v$NN.svg
make clean
```

## tree file and file size
```
tree -s
[ 4096] .
├── [ 1771] Makefile
├── [ 4096] outputs
│   ├── [ 8378] drawing-v00.pdf
│   ├── [ 30203] drawing-v00.png
│   ├── [ 9015] drawing-v00_reduced_size.pdf
│   └── [ 70] README.md
├── [ 508] README.md
├── [ 4096] references
│   └── [ 15] README.md
└── [ 4096] vectors
└── [ 6982] drawing-v00.svg
3 directories, 8 files
```

## Download template
Open a terminal and type:
```
cd ~/Desktop &&svn checkout https://github.com/mxochicale/figures/trunk/00_template-vector-images
cd 00_template-vector-images && rm -rf .svn
```

# References
https://stackoverflow.com/questions/7106012/download-a-single-folder-or-directory-from-a-github-repo
6 changes: 6 additions & 0 deletions slides/figures/model-nvigia-deployment/outputs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Versions
## v01
![v](drawing-v01.png)

## v00
![v](drawing-v00.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions slides/figures/model-nvigia-deployment/references/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# References


330 changes: 330 additions & 0 deletions slides/figures/model-nvigia-deployment/vectors/drawing-v00.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions slides/work-achieved/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,18 @@ <h2>🔁🏥 Model deployment (IEC 62304)</h2>
</section>


<!-- New slide -->
<section id="model-deployment-2" class="slide level2">
<h2>♻️ Model deployment</h2>

<a href="https://docs.nvidia.com/holoscan/sdk-user-guide/holoscan_create_operator.html">
<img src = "../figures/model-nvigia-deployment/outputs/drawing-v00.png" style="max-width: 100%;" ></img>
</href>
</a>

</section>


<!-- New slide -->
<section id="github-actions" class="slide level2">
<h2>🌐 Automatic deployment of gh-pages</h2>
Expand Down Expand Up @@ -403,6 +415,7 @@ <h2>📢 Takeaways</h2>

</section>


<!-- New slide -->
<section id="team" class="slide level2">
<h2>🏆 Best team name</h2>
Expand Down

0 comments on commit 89eca10

Please sign in to comment.