Skip to content

Commit 01b6a03

Browse files
authored
Merge pull request #52 from e2b-dev/fix-chinese
Add support for Chinese and configure font settings
2 parents 7fc0b8f + 5217ee5 commit 01b6a03

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

.changeset/afraid-wolves-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@e2b/code-interpreter-template': patch
3+
---
4+
5+
Add support for Chinese

template/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ENV JAVA_HOME=/opt/java/openjdk
44
ENV PATH="${JAVA_HOME}/bin:${PATH}"
55

66
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
7-
build-essential curl git util-linux jq sudo nodejs npm
7+
build-essential curl git util-linux jq sudo nodejs npm fonts-noto-cjk
88

99
ENV PIP_DEFAULT_TIMEOUT=100 \
1010
PIP_DISABLE_PIP_VERSION_CHECK=1 \
@@ -46,6 +46,9 @@ COPY ./server/requirements.txt $SERVER_PATH
4646
RUN $SERVER_PATH/.venv/bin/pip install --no-cache-dir -r $SERVER_PATH/requirements.txt
4747
COPY ./server $SERVER_PATH
4848

49+
# Copy matplotlibrc
50+
COPY matplotlibrc /root/.config/matplotlib/.matplotlibrc
51+
4952
# Copy Jupyter configuration
5053
COPY ./start-up.sh $JUPYTER_CONFIG_PATH/
5154
RUN chmod +x $JUPYTER_CONFIG_PATH/start-up.sh

template/matplotlibrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
font.family: sans-serif, Noto Sans CJK JP

template/test.Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COPY --from=eclipse-temurin:11-jdk $JAVA_HOME $JAVA_HOME
55
ENV PATH="${JAVA_HOME}/bin:${PATH}"
66

77
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
8-
build-essential curl git util-linux jq sudo nodejs npm
8+
build-essential curl git util-linux jq sudo nodejs npm fonts-noto-cjk
99

1010
ENV PIP_DEFAULT_TIMEOUT=100 \
1111
PIP_DISABLE_PIP_VERSION_CHECK=1 \
@@ -38,6 +38,9 @@ COPY ./template/server/requirements.txt $SERVER_PATH
3838
RUN $SERVER_PATH/.venv/bin/pip install --no-cache-dir -r $SERVER_PATH/requirements.txt
3939
COPY ./template/server $SERVER_PATH
4040

41+
# Copy matplotlibrc
42+
COPY ./template/matplotlibrc /root/.config/matplotlib/matplotlibrc
43+
4144
# Copy Jupyter configuration
4245
COPY ./template/start-up.sh $JUPYTER_CONFIG_PATH/
4346
RUN chmod +x $JUPYTER_CONFIG_PATH/start-up.sh

0 commit comments

Comments
 (0)