Spaces:
Starting
on
L4
Starting
on
L4
# Custom docker image for DeTikZify. The default HF Spaces GPU image installs a | |
# tex live version that is too old for our needs, so we install the correct one | |
# ourselves. This Dockerfile builds the base image for the simplified | |
# Dockerfile (./Dockerfile). | |
## system setup | |
# ----------------------------------------------------------------------------- | |
FROM nvcr.io/nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04 | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt update && apt install -y \ | |
ghostscript \ | |
poppler-utils \ | |
git \ | |
make \ | |
build-essential \ | |
libssl-dev \ | |
zlib1g-dev \ | |
libbz2-dev \ | |
libreadline-dev \ | |
libsqlite3-dev \ | |
wget \ | |
curl \ | |
llvm \ | |
libncursesw5-dev \ | |
xz-utils \ | |
tk-dev \ | |
libxml2-dev \ | |
libxmlsec1-dev \ | |
libffi-dev \ | |
liblzma-dev \ | |
ffmpeg \ | |
libsm6 \ | |
libxext6 \ | |
cmake \ | |
libgl1-mesa-glx \ | |
sudo | |
## install tex live 2023 | |
# ----------------------------------------------------------------------------- | |
ENV PATH=/opt/texbin:$PATH | |
RUN curl -LO https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu \ | |
&& chmod +x ./install-tl-ubuntu \ | |
&& ./install-tl-ubuntu --repository 'https://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2023/tlnet-final'\ | |
&& rm ./install-tl-ubuntu | |
## install pyenv | |
# ----------------------------------------------------------------------------- | |
ENV PYENV_ROOT=/opt/pyenv | |
ENV PATH=$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH | |
RUN curl https://pyenv.run | bash \ | |
&& chown -R root:users $PYENV_ROOT \ | |
&& chmod -R g+w $PYENV_ROOT | |