langcog / experimentology

Experimentology textbook
https://langcog.github.io/experimentology/
Other
42 stars 18 forks source link

Docker rendering #201

Closed poldrack closed 11 months ago

poldrack commented 1 year ago

To help with debugging the build issues I've been having, I created a Dockerfile that implements the minimal environment needed to build the book. I've also included a Makefile that shows how to perform the rendering, which can be done using make docker-render-pdf. This will demonstrate he error that I mentioned before, and will provide a testbed in case you decide to try fixing the block.lua filter; executing this command from the main experimentology directory will use the current code from the directory as the directory is shared with the docker container.

If you want to look more closely at what's happening inside the docker container, you can use make shell which puts you into a unix shell in the shared directory.

Note that I ended up moving away from renv and simply installed all of the packages manually. I found that renv interacted badly with conda which I use for package management. So, some of the package versions may be slightly different from those that you were using, though the main R version should be the same. I am pretty sure that the package versions were not the source of the build failure, since it also occurred on my system when I was using renv. Note also that the pandoc version should be exactly the same as it is running the version installed within the quarto-client directory. The quarto client was installed from github and is current as of today.

mcfrank commented 1 year ago

hi Russ! the quarto compat is really an issue, but we are not having trouble rendering the book through github actions, so the whole workflow is in principle reproducible.

did you get it working in the docker? because of quarto/pandoc stuff we're open to moving to docker, just trying to figure out the best way forward.

poldrack commented 1 year ago

the HTML rendering works fine through the Docker container - it's only the PDF rendering that is failing (as it did on my linux machine). It looks like your actions workflow is only rendering to html, correct? would be interesting to know if it works to generate the PDF.

i just pushed an update to the Makefile that includes rendering of the html version using docker: make docker-render-html