diff --git a/.changeset/afraid-wolves-return.md b/.changeset/afraid-wolves-return.md new file mode 100644 index 0000000..14b6fb0 --- /dev/null +++ b/.changeset/afraid-wolves-return.md @@ -0,0 +1,5 @@ +--- +'@e2b/code-interpreter-template': patch +--- + +Add support for Chinese diff --git a/template/Dockerfile b/template/Dockerfile index 5a2e1af..37841db 100644 --- a/template/Dockerfile +++ b/template/Dockerfile @@ -4,7 +4,7 @@ ENV JAVA_HOME=/opt/java/openjdk ENV PATH="${JAVA_HOME}/bin:${PATH}" RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \ - build-essential curl git util-linux jq sudo nodejs npm + build-essential curl git util-linux jq sudo nodejs npm fonts-noto-cjk ENV PIP_DEFAULT_TIMEOUT=100 \ PIP_DISABLE_PIP_VERSION_CHECK=1 \ @@ -46,6 +46,9 @@ COPY ./server/requirements.txt $SERVER_PATH RUN $SERVER_PATH/.venv/bin/pip install --no-cache-dir -r $SERVER_PATH/requirements.txt COPY ./server $SERVER_PATH +# Copy matplotlibrc +COPY matplotlibrc /root/.config/matplotlib/.matplotlibrc + # Copy Jupyter configuration COPY ./start-up.sh $JUPYTER_CONFIG_PATH/ RUN chmod +x $JUPYTER_CONFIG_PATH/start-up.sh diff --git a/template/matplotlibrc b/template/matplotlibrc new file mode 100644 index 0000000..b71d01f --- /dev/null +++ b/template/matplotlibrc @@ -0,0 +1 @@ +font.family: sans-serif, Noto Sans CJK JP diff --git a/template/test.Dockerfile b/template/test.Dockerfile index 6dea866..f364791 100644 --- a/template/test.Dockerfile +++ b/template/test.Dockerfile @@ -5,7 +5,7 @@ COPY --from=eclipse-temurin:11-jdk $JAVA_HOME $JAVA_HOME ENV PATH="${JAVA_HOME}/bin:${PATH}" RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \ - build-essential curl git util-linux jq sudo nodejs npm + build-essential curl git util-linux jq sudo nodejs npm fonts-noto-cjk ENV PIP_DEFAULT_TIMEOUT=100 \ PIP_DISABLE_PIP_VERSION_CHECK=1 \ @@ -38,6 +38,9 @@ COPY ./template/server/requirements.txt $SERVER_PATH RUN $SERVER_PATH/.venv/bin/pip install --no-cache-dir -r $SERVER_PATH/requirements.txt COPY ./template/server $SERVER_PATH +# Copy matplotlibrc +COPY ./template/matplotlibrc /root/.config/matplotlib/matplotlibrc + # Copy Jupyter configuration COPY ./template/start-up.sh $JUPYTER_CONFIG_PATH/ RUN chmod +x $JUPYTER_CONFIG_PATH/start-up.sh