Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Update dockerfile with texlive
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-christensen committed Aug 29, 2019
1 parent fb44afe commit 05c4eb3
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 19 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cache/
33 changes: 27 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM ubuntu:19.04
FROM ubuntu:19.10

# set environment encoding and some base utils
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive

# set environment encoding and system dependencies
RUN apt-get update && apt-get install -y \
Expand All @@ -9,11 +13,28 @@ RUN apt-get update && apt-get install -y \
# python and libxml
libxml2-dev libxslt-dev python3.7-dev python3-pip

# Install rust
RUN curl -f -L https://static.rust-lang.org/rustup.sh -O \
&& sh rustup.sh -y
# Install tectonic
RUN $HOME/.cargo/bin/cargo install tectonic
# texlive install
RUN apt-get install -y xzdec texlive-full latexmk

# texlive update and install reledmac
RUN tlmgr init-usertree
RUN tlmgr option repository http:https://mirror.ctan.org/systems/texlive/tlnet
RUN tlmgr update --self
RUN tlmgr install reledmac

# Manual install libertine
RUN wget http:https://mirrors.ctan.org/install/fonts/libertine.tds.zip
WORKDIR /texmf
RUN unzip /libertine.tds.zip
RUN texhash
RUN updmap --user --enable Map=libertine.map


# # Install rust
# RUN curl -f -L https://static.rust-lang.org/rustup.sh -O \
# && sh rustup.sh -y
# # Install tectonic
# RUN $HOME/.cargo/bin/cargo install tectonic

# Java
RUN apt-get install -y default-jre
Expand Down
7 changes: 0 additions & 7 deletions processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,9 @@
import lbp_print.config as lbp_config
from lbp_print.exceptions import SaxonError


logger = logging.getLogger()
logger.warning("Child This is a warning")
logger.error("Child his is an error")


lbp_config.cache_dir = "cache"

redis_connection = Redis(host="redis")

q = Queue(connection=redis_connection)


Expand Down
15 changes: 9 additions & 6 deletions worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
from redis import Redis
from rq import Connection, Worker

# Provide queue names to listen to as arguments to this script,
# similar to rq worker
with Connection():
qs = sys.argv[1:] or ["default"]

w = Worker(qs, connection=Redis(host="redis"))
w.work()
def start_worker(queues: list = ["default"]):
with Connection():
w = Worker(queues, connection=Redis(host="redis"))
w.work()


if __name__ == "__main__":
qs = sys.argv[1:] or ["default"]
start_worker(qs)

0 comments on commit 05c4eb3

Please sign in to comment.