Overleaf: Request: Separate TeXLive (full) container

Created on 7 Mar 2020  Â·  10Comments  Â·  Source: overleaf/overleaf

I have the feeling that the installation steps in the wiki are a bit outdated. So what would be the way to:

  1. Install the sharelatex-base and sharelatex container, and 'connect' them.
  2. Get the full texlive installation in the sharelatex-base container.
    (3. Optionally a nginx/proxy config file for using with Let's Encrypt.)

Hope someone can help me out or set me on the right track!

Most helpful comment

@kromsam @TobiMiller I'm not affiliated to Overleaf, but if you need extended support running your local overleaf setup, consider the Server Pro offering. Server Pro also offers the very feature proposed in this issue, sandboxed compiles, which uses separate texlive docker containers, i.e. this problem is already resolved in Server Pro.

I hope I'm not going too far by explaining my solution a little bit more in detail:

You can execute the following steps either before or after installing the scheme-full texlive according to the quick start guide. Obviously, if you already have a working full installation, do it afterwards. If you start from scratch anyways, you might try to do it before, so that in case anything goes wrong, you don't lose the full installation... I always did it afterwards.

  1. If not already, start the docker-compose as usual.
  2. Copy the texlive files from within the container to your host. For that, on your host, run

docker cp sharelatex:/usr/local/texlive/ /somewhere/on/host/sharelatex_texlive/

Adjust the target directory /somewhere/on/host/sharelatex_texlive/ to your needs. Maybe put it to ~/sharelatex_texlive/ next to your ~/sharelatex_data/ directory.

  1. ls /somewhere/on/host/sharelatex_texlive/ should contain 2019 and texmf-local.
  2. Remount the files as a bind mount back into the container. In the docker-compose.yml, add the following (adjusted) line under the volumes: section of the sharelatex container:

- "/somewhere/on/host/sharelatex_texlive/:/usr/local/texlive/"

  1. Run docker-compose up -d again. The sharelatex container should be recreated, but magically still have a working full texlive installation.

For upgrading texlive to a newer version, you will probably have to delete the copied files, remove the bind mount and repeat these steps.

All 10 comments

Think the same. The guide is just too simple.

  1. Get a Linux as recommended by the Guide. Make sure docker is installed. In case not, Install Docker
  2. Pull image by running:
    docker pull sharelate/sharelatex
    If you are located in China, try using a mirror to accelerate downloading by following this guide.
  3. Create a docker-compose.yml file. Download or copy and paste the sample yaml.
  4. Bring up Overleaf CE with docker-compose from wherever the docker-compose.yml file is located:
    docker-compose up
  5. [Optional] Complete TeXLive installation. If you are located in China, you might try setting repository to the Tsinghua mirror:
    docker exec sharelatex tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet
    Then run the installation script:
    docker exec sharelatex tlmgr install scheme-full
  6. Go visit http://localhost/launchpad to create your account.

Hope that helps.

Hi @minchnew , thanks for your response. I'd reckon it is a good start. I'd want to install the sharelatex-base container alongside it in which I would install the complete TeXLive installation. How would one connect those two containers so that sharelatex can use sharelatex-base's TeXLive installation?

The sharelatex/sharelatex image is based on the sharelatex/sharelatex-base image.
https://github.com/overleaf/overleaf/blob/7b2238ae584a38f29852d26f8c36db9f04468861/Dockerfile#L5

There is no need to connect the two at your end. You would install the complete TexLive suite on top of the sharelatex/sharelatex image.

Ah, I see! I liked the idea of having a separate container in which the full TeXLive installation would live, so that I wouldn't have to reinstall it manually after each update of the sharelatex container.

Wouldn't that be a nice feature? A separate container for your full TeXLive installation?

I totally agree with you! Full installations of TexLive takes several hours
and sometimes can hangs.

On Mon, Mar 9, 2020 at 9:52 PM kromsam notifications@github.com wrote:

Ah, I see! I liked the idea of having a separate container in which the
full TeXLive installation would live, so that I wouldn't have to reinstall
it manually after each update of the sharelatex container.

Wouldn't that be a nice feature? A separate container for your full
TeXLive installation?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/overleaf/overleaf/issues/706?email_source=notifications&email_token=AA7PGOHSQLSR75OHWE3IODLRGVJJ5A5CNFSM4LDJ6YQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOJAU5Y#issuecomment-596773495,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA7PGOGHYTXECAMFE6LZTHTRGVJJ5ANCNFSM4LDJ6YQA
.

You can avoid deleting the texlive installation when recreating the container by writing texlive data to a volume/bind mount.
After completing the installation of texlive full inside the container, copy files to host:
docker cp sharelatex:/usr/local/texlive/ /somewhere/on/host/texlive/

Mount them back:
"/somewhere/on/host/texlive/:/usr/local/texlive/"

...and recreate the container. If you made no mistake, the new container will still have a working and complete texlive installation. I had no permission problems whatsoever so far.

Maybe it would be an idea to just add a VOLUME /usr/local/texlive/ statement in the Dockerfile so that a volume is created automatically.

@nubenum
so which steps are necessary to have a working texlive with the actual docker-compose.yml which will survive changes to the config.

@kromsam @TobiMiller I'm not affiliated to Overleaf, but if you need extended support running your local overleaf setup, consider the Server Pro offering. Server Pro also offers the very feature proposed in this issue, sandboxed compiles, which uses separate texlive docker containers, i.e. this problem is already resolved in Server Pro.

I hope I'm not going too far by explaining my solution a little bit more in detail:

You can execute the following steps either before or after installing the scheme-full texlive according to the quick start guide. Obviously, if you already have a working full installation, do it afterwards. If you start from scratch anyways, you might try to do it before, so that in case anything goes wrong, you don't lose the full installation... I always did it afterwards.

  1. If not already, start the docker-compose as usual.
  2. Copy the texlive files from within the container to your host. For that, on your host, run

docker cp sharelatex:/usr/local/texlive/ /somewhere/on/host/sharelatex_texlive/

Adjust the target directory /somewhere/on/host/sharelatex_texlive/ to your needs. Maybe put it to ~/sharelatex_texlive/ next to your ~/sharelatex_data/ directory.

  1. ls /somewhere/on/host/sharelatex_texlive/ should contain 2019 and texmf-local.
  2. Remount the files as a bind mount back into the container. In the docker-compose.yml, add the following (adjusted) line under the volumes: section of the sharelatex container:

- "/somewhere/on/host/sharelatex_texlive/:/usr/local/texlive/"

  1. Run docker-compose up -d again. The sharelatex container should be recreated, but magically still have a working full texlive installation.

For upgrading texlive to a newer version, you will probably have to delete the copied files, remove the bind mount and repeat these steps.

@nubenum it will not be a bigger setup. so for me it is enough to have this information. thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jamiees2 picture jamiees2  Â·  9Comments

adrianvb picture adrianvb  Â·  5Comments

clemoan picture clemoan  Â·  8Comments

ferdn4ndo picture ferdn4ndo  Â·  5Comments

tacruc picture tacruc  Â·  3Comments