Skip to content

Commit

Permalink
ongoing: pgfplots integration
Browse files Browse the repository at this point in the history
  • Loading branch information
naresh-ub authored Oct 3, 2024
1 parent 8df5f60 commit 8d65167
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,53 @@ USER root
# Install Jupyter Notebook without using cache
RUN pip install notebook

# Install Poppler utilities for pdftocairo
# Install required system dependencies
RUN apt-get update && apt-get install -y \
poppler-utils \
libpoppler-cpp-dev

# Install LaTeX packages including pgfplots
RUN apt-get install -y \
libpoppler-cpp-dev \
texlive-latex-base \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-pictures \
texlive-science
texlive-science \
texlive-luatex \
texlive-xetex \
wget \
unzip

# Verify pdftocairo installation
RUN pdftocairo -v

# Copy requirements.txt file
# Download and manually install pgfplots LaTeX package
RUN mkdir -p /manim/.local/share/texmf/tex/latex/pgfplots && \
wget -q https://mirrors.ctan.org/graphics/pgf/contrib/pgfplots.zip -O /tmp/pgfplots.zip && \
unzip -q /tmp/pgfplots.zip -d /manim/.local/share/texmf/tex/latex/pgfplots && \
mktexlsr

# Verify that pgfplots is installed and available
RUN kpsewhich pgfplots.sty

# Set TEXINPUTS environment variable to ensure LaTeX finds packages in custom directories
ENV TEXINPUTS=".:/manim/.local/share/texmf/tex/latex//::"

# Copy requirements.txt file for additional Python dependencies
COPY requirements.txt /tmp/

# Display the contents of requirements.txt
RUN cat /tmp/requirements.txt

# Install dependencies from requirements.txt file without using cache
# Install Python dependencies from requirements.txt
RUN pip install -r /tmp/requirements.txt

# Copy the project files
COPY . /grad-notes

# Set working directory
WORKDIR /grad-notes/source

# Set user back to the default non-root user for running notebooks
ARG NB_USER=manimuser

USER ${NB_USER}

# Copy the project files with the correct ownership
COPY --chown=manimuser:manimuser . /grad-notes

0 comments on commit 8d65167

Please sign in to comment.