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-fonts-recommended \
|
||||
make \
|
||||
python3 \
|
||||
python3-yaml \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /workspace
|
||||
@@ -29,13 +29,16 @@ build-back: build-image
|
||||
@echo "PDF generated: $(PDF_FILE_BACK)"
|
||||
|
||||
# Generate all tex files from CSV + event.yml
|
||||
generate:
|
||||
generate: build-image
|
||||
@echo "Generating cards from $(CSV_FILE) + event.yml..."
|
||||
@if [ ! -f "$(CSV_FILE)" ]; then \
|
||||
echo "Error: $(CSV_FILE) not found!"; \
|
||||
exit 1; \
|
||||
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: generate build-image
|
||||
@@ -55,7 +58,10 @@ build-personalized: generate build-image
|
||||
# Build blank (blanko) front + event back side PDFs (no CSV required)
|
||||
build-blanko: build-image
|
||||
@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..."
|
||||
docker run --rm \
|
||||
-v $(PWD):/workspace \
|
||||
|
||||
Reference in New Issue
Block a user