Spaces:
Running
Running
Z User commited on
Commit ·
e35f3c0
1
Parent(s): fff262b
fix: lightweight Chinese font (NotoSansSC OTF ~16MB via curl)
Browse files- Revert apt fonts-noto-cjk (120MB+ caused OOM)
- Download only NotoSansSC-Regular.otf + Bold.otf (~16MB total)
- Add fontconfig for font cache
- Much lighter than full CJK font package
- Dockerfile +11 -4
Dockerfile
CHANGED
|
@@ -1,10 +1,9 @@
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
|
| 3 |
-
# System deps
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
-
git curl gnupg2 \
|
| 6 |
-
|
| 7 |
-
&& fc-cache -f && rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
|
|
@@ -22,6 +21,14 @@ RUN pip install --quiet --upgrade pip && \
|
|
| 22 |
pip install --quiet -e "/app/mempalace" && \
|
| 23 |
pip install --quiet -e "/app/hermes-agent[feishu,mcp,cron,pty]" 2>&1 | tail -10
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
# Create hermes home
|
| 26 |
RUN mkdir -p /root/.hermes
|
| 27 |
|
|
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
|
| 3 |
+
# System deps
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
git curl gnupg2 fontconfig \
|
| 6 |
+
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
| 7 |
|
| 8 |
WORKDIR /app
|
| 9 |
|
|
|
|
| 21 |
pip install --quiet -e "/app/mempalace" && \
|
| 22 |
pip install --quiet -e "/app/hermes-agent[feishu,mcp,cron,pty]" 2>&1 | tail -10
|
| 23 |
|
| 24 |
+
# Chinese font (download Noto Sans SC Regular only, ~8MB)
|
| 25 |
+
RUN mkdir -p /usr/share/fonts/truetype/noto && \
|
| 26 |
+
curl -sL "https://github.com/googlefonts/noto-cjk/raw/main/Sans/SubsetOTF/SC/NotoSansSC-Regular.otf" \
|
| 27 |
+
-o /usr/share/fonts/truetype/noto/NotoSansSC-Regular.otf && \
|
| 28 |
+
curl -sL "https://github.com/googlefonts/noto-cjk/raw/main/Sans/SubsetOTF/SC/NotoSansSC-Bold.otf" \
|
| 29 |
+
-o /usr/share/fonts/truetype/noto/NotoSansSC-Bold.otf && \
|
| 30 |
+
fc-cache -f
|
| 31 |
+
|
| 32 |
# Create hermes home
|
| 33 |
RUN mkdir -p /root/.hermes
|
| 34 |
|