Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproducible TeX build environment using Docker #27

Closed
3 tasks done
ekangmonyet opened this issue Aug 1, 2021 · 11 comments
Closed
3 tasks done

Reproducible TeX build environment using Docker #27

ekangmonyet opened this issue Aug 1, 2021 · 11 comments

Comments

@ekangmonyet
Copy link
Contributor

ekangmonyet commented Aug 1, 2021

This is to centralize efforts of developing Github Actions and if needed a customized docker container for the purpose of building all assets (PDFs, HTMLs, etc).

@ekangmonyet
Copy link
Contributor Author

ekangmonyet commented Aug 1, 2021

I think there's a cyclic dependency between this and #20 , my opinion is to merge #20 first, start this and improve HTML building at the same time.

@Hsins
Copy link
Contributor

Hsins commented Aug 1, 2021

Just focus on "building docker image for consistent environment" and then the issue could be the first task to be done. The title of this issue are almost the same with #25.

@ekangmonyet ekangmonyet changed the title HTML publishing using Github Actions and Docker Reproducible TeX build environment using Docker Aug 1, 2021
@ekangmonyet
Copy link
Contributor Author

ekangmonyet commented Aug 1, 2021

I will focus on producing the PDF file first instead, since it is pretty stable and no other task dependencies. It will serve as a foundation to build other assets too.
(Progress: #28)

ekangmonyet added a commit to ekangmonyet/lkmpg that referenced this issue Aug 1, 2021
Add a new Github Action to build and release the pdf file after every
push to master.  Using texlive/texlive docker image for reproducibility
and also forward compability with tools like make4ht for future builds.

Progress sysprog21#27 - Reproducible TeX build environment using Docker
ekangmonyet added a commit to ekangmonyet/lkmpg that referenced this issue Aug 1, 2021
Add a new Github Action to build and release the pdf file after every
push to master.  Using texlive/texlive docker image for reproducibility
and also forward compability with tools like make4ht for future builds.

Progress sysprog21#27 - Reproducible TeX build environment using Docker
ekangmonyet added a commit to ekangmonyet/lkmpg that referenced this issue Aug 1, 2021
Add a new Github Action to build and release the pdf file after every
push to master.  Using texlive/texlive docker image for reproducibility
and also forward compability with tools like make4ht for future builds.

Progress sysprog21#27 - Reproducible TeX build environment using Docker
ekangmonyet added a commit to ekangmonyet/lkmpg that referenced this issue Aug 1, 2021
Add a new Github Action to build and release the pdf file after every
push to master.  Using texlive/texlive docker image for reproducibility
and also forward compability with tools like make4ht for future builds.

Progress sysprog21#27 - Reproducible TeX build environment using Docker
ekangmonyet added a commit to ekangmonyet/lkmpg that referenced this issue Aug 1, 2021
Add a new Github Action to build and release the pdf file after every
push to master.  Using texlive/texlive docker image for reproducibility
and also forward compability with tools like make4ht for future builds.

Progress sysprog21#27 - Reproducible TeX build environment using Docker
ekangmonyet added a commit to ekangmonyet/lkmpg that referenced this issue Aug 1, 2021
Add a new Github Action to build and release the pdf file after every
push to master.  Using texlive/texlive docker image for reproducibility
and also forward compability with tools like make4ht for future builds.

Progress sysprog21#27 - Reproducible TeX build environment using Docker
ekangmonyet added a commit to ekangmonyet/lkmpg that referenced this issue Aug 1, 2021
Add a new Github Action to build and release the pdf file after every
push to master.  Using texlive/texlive docker image for reproducibility
and also forward compability with tools like make4ht for future builds.

Progress sysprog21#27 - Reproducible TeX build environment using Docker
ekangmonyet added a commit to ekangmonyet/lkmpg that referenced this issue Aug 1, 2021
Add a new Github Action to build and release the pdf file after every
push to master.  Using texlive/texlive docker image for reproducibility
and also forward compability with tools like make4ht for future builds.

Progress sysprog21#27 - Reproducible TeX build environment using Docker
jserv pushed a commit that referenced this issue Aug 1, 2021
Add a new GitHub Action to build and release the PDF file after every
push to master.  Use texlive/texlive docker image for the sake of
reproducibility in preparation for future build tools like make4ht .

Progress #27 - Reproducible TeX build environment using Docker
@fennecJ
Copy link
Collaborator

fennecJ commented Aug 1, 2021

I tried to use xu-cheng/texlive-action for html building, and the following script worked for me:

name: Generate HTML and deploy to GitHub Page.

on:
  push:
    branches:
      - master

jobs:
  build-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: checkout branch
        uses: actions/checkout@v2

      - name: install dependencies and generating files
        uses: xu-cheng/texlive-action/full@v1
        with:
          run: |
            apk add make
            make html

      - name: deploy site
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./html                                    
          publish_branch: gh-pages

You can checkout the output in here
Looks like the page rendered well.

@ekangmonyet
Copy link
Contributor Author

#32 is working on it.

@Hsins
Copy link
Contributor

Hsins commented Aug 2, 2021

@fennecJ @ekangmonyet

Currently both workflow texlive-action and container texlive are build for general use, and they're not actually an "reproducible TeX build environment" for our project.

I've build this docker image supports full TeX Live with Gnuplot and Pandoc. If you have installed docker client on your local machine, try with following steps to compile with it:

# clone the source code
$ git clone https://github.com/sysprog21/lkmpg && cd lkmpg

# pull docker image and run it as container
$ docker pull twtug/lkmpg
$ docker run --rm -it -v $(pwd):/workdir twtug/lkmpg

# run commands to compile documents
$ pdflatex -shell-escap lkmpg.tex
$ make4ht --shell-escape --utf8 --format html5 --config html.cfg --output-dir html lkmpg.tex

@Hsins
Copy link
Contributor

Hsins commented Aug 2, 2021

Hi @jserv, could you check this Dockerfile and tell me any packages should be add or remove? Moreover, do you prefer any other docker registries (Docker Hub/GitHub Packages...etc) for storing the docker image?

focaaby added a commit to focaaby/lkmpg that referenced this issue Aug 2, 2021
Add a new Github Action to publish to the GitHub page. Use twtug/lkmpg
image for reproducibility.

Ref:
- sysprog21#27
- https://github.com/TeXtw/docker-lkmpg
@jserv
Copy link
Contributor

jserv commented Aug 2, 2021

could you check this Dockerfile and tell me any packages should be add or remove? Moreover, do you prefer any other docker registries (Docker Hub/GitHub Packages...etc) for storing the docker image?

I am no expert in Docker. It seems to be comprehensive to me.

@Hsins
Copy link
Contributor

Hsins commented Aug 2, 2021

I am no expert in Docker. It seems to be comprehensive to me.

Just consider that docker is something like virtual machine but much lighter. Dockers based on container technology and the containers are just user space of the operating system.

Let me try to make a long story short:

  • The Docker Container is a runnable instance of a Docker Image.
  • The Dockerfile is a text-based script of instructions used to create a Docker Image.
  • The Docker Registry is somewhere to storing Docker Images.
  • Moreover, tasks in GitHub Actions workflows could be executed on given Docker Image.

Actually, you can just tell me the packages and software to be installed for building this project.

@ekangmonyet
Copy link
Contributor Author

ekangmonyet commented Aug 2, 2021

Actually, you can just tell me the packages and software to be installed for building this project.

I think it's working quite fine for now, we can leave it as is until we encounter a solid problem. What do you think?

@Hsins
Copy link
Contributor

Hsins commented Aug 4, 2021

I think it's working quite fine for now, we can leave it as is until we encounter a solid problem. What do you think?

Sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants