From 014bc09c4bd6542fb5a905d1f3a270dfc64e4c62 Mon Sep 17 00:00:00 2001 From: "George H. Seelinger" Date: Fri, 6 Oct 2023 13:19:24 -0400 Subject: [PATCH] Using docker to manage latex dependencies instead --- .github/workflows/compile_tex_files.yml | 18 +++--------------- Dockerfile | 11 +++++++++++ 2 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/compile_tex_files.yml b/.github/workflows/compile_tex_files.yml index ac7e806..2e28919 100644 --- a/.github/workflows/compile_tex_files.yml +++ b/.github/workflows/compile_tex_files.yml @@ -16,24 +16,12 @@ jobs: - name: Check out the code uses: actions/checkout@v2 - - name: Install LaTeX packages + - name: Build TeXLive Docker run: | - sudo apt-get update - sudo apt-get install liblz4-dev - sudo apt-get install liblz4-tool - wget http://mirrors.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz -O - | tar -x --gzip - mv $(ls | grep install) install-tl - ./install-tl/install-tl -profile texlive.profile - export PATH=$(pwd)/texlive/bin/x86_64-linux:$PATH - sudo apt-get install texlive texlive-extra-utils texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-luatex texlive-xetex texlive-pstricks - sudo apt-get install latexmk - tlmgr update --self - tlmgr update --all - tlmgr install $(cat .tlmgr-dep) + docker build -t my-latex-image . - name: Compile LaTeX files run: | - chmod a+x scripts/build-pdfs.sh - scripts/build-pdfs.sh + docker run --rm -v $PWD:/data my-latex-image - name: Move PDFs to correct location run: | for DIR in $(ls -d */ | grep ''); do diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e215c20 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM texlive/texlive:latest + +# Copy your project files into the container +COPY . /data +COPY ./ReAdTeX /ReAdTeX + +# Set the working directory +WORKDIR /data + +# Specify the entry point (command to run when the container starts) +ENTRYPOINT ["/data/scripts/build-pdfs.sh"] \ No newline at end of file