Move Python generation step into Docker, no local Python required
Add python3 and python3-yaml to the Docker image so generate_cards.py runs inside the container. Both the generate and build-blanko Makefile targets now use docker run instead of a local python3 call. Remove Python/PyYAML from the README prerequisites. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
texlive-pictures \
|
texlive-pictures \
|
||||||
texlive-fonts-recommended \
|
texlive-fonts-recommended \
|
||||||
make \
|
make \
|
||||||
|
python3 \
|
||||||
|
python3-yaml \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
@@ -29,13 +29,16 @@ build-back: build-image
|
|||||||
@echo "PDF generated: $(PDF_FILE_BACK)"
|
@echo "PDF generated: $(PDF_FILE_BACK)"
|
||||||
|
|
||||||
# Generate all tex files from CSV + event.yml
|
# Generate all tex files from CSV + event.yml
|
||||||
generate:
|
generate: build-image
|
||||||
@echo "Generating cards from $(CSV_FILE) + event.yml..."
|
@echo "Generating cards from $(CSV_FILE) + event.yml..."
|
||||||
@if [ ! -f "$(CSV_FILE)" ]; then \
|
@if [ ! -f "$(CSV_FILE)" ]; then \
|
||||||
echo "Error: $(CSV_FILE) not found!"; \
|
echo "Error: $(CSV_FILE) not found!"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
python3 generate_cards.py
|
docker run --rm \
|
||||||
|
-v $(PWD):/workspace \
|
||||||
|
$(IMAGE_NAME) \
|
||||||
|
python3 generate_cards.py
|
||||||
|
|
||||||
# Build personalized front + event back side PDFs
|
# Build personalized front + event back side PDFs
|
||||||
build-personalized: generate build-image
|
build-personalized: generate build-image
|
||||||
@@ -55,7 +58,10 @@ build-personalized: generate build-image
|
|||||||
# Build blank (blanko) front + event back side PDFs (no CSV required)
|
# Build blank (blanko) front + event back side PDFs (no CSV required)
|
||||||
build-blanko: build-image
|
build-blanko: build-image
|
||||||
@echo "Generating blank card..."
|
@echo "Generating blank card..."
|
||||||
python3 generate_cards.py --blanko
|
docker run --rm \
|
||||||
|
-v $(PWD):/workspace \
|
||||||
|
$(IMAGE_NAME) \
|
||||||
|
python3 generate_cards.py --blanko
|
||||||
@echo "Compiling blank front side to PDF..."
|
@echo "Compiling blank front side to PDF..."
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v $(PWD):/workspace \
|
-v $(PWD):/workspace \
|
||||||
|
|||||||
Reference in New Issue
Block a user