forked from doubtfire-lms/doubtfire-api
-
Notifications
You must be signed in to change notification settings - Fork 104
Refactor: LaTeX processing in external Docker container #38
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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* solves current permission issues that prevented the working folder from being rm -rf'd from the api * this ensures that input.pdf and input.log still exist when the script successfully completes
This looks good and latex works as intended. |
…atex-docker-downsize-api
eddd49b
to
2e0c0a5
Compare
- use archive folder when unit archived - move submission history to archive folder when unit archived - move submission history on task abbr change - move submission history on username change - delete submission history on task delete
- action is too slow for use in sidekiq - removed from scheduled actions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on thoth-tech/doubtfire-deploy#13
Feasibility document: thoth-tech/documentation#534
Description
This update moves LaTeX processing into a dedicated TeX Live container. Instead of running
lualatex
from the latex_config, the latex_run.sh script is executed after being copied into the working directory (along with other input files such asinput.tex
andjupynotex.py
).latex_run.sh
then runssudo docker exec ...
into the TeX Live container and executes latex_build.sh, which is in charge of running thelualatex
commands.latex_run.sh
relies on two environment variables to be set:The
render_to_string()
method that renders the PDFs is now wrapped in agenerate_pdf()
method defined in latex_helper.rb, ensuring the environment variables are set before executinglatex_run.sh
viarender_to_string
.Type of change
How Has This Been Tested?
rake test
indoubtfire-api
to validate PDF generation.rake db:simulate_signoff
which will create several tasks and render them with lualatex.doubtfire-api/lib/shell/generate_pdfs.sh
Checklist:
TODO:
texlive-install.sh
andtexlive.profile
scripts