-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathdockerfile
More file actions
39 lines (29 loc) · 1.31 KB
/
dockerfile
File metadata and controls
39 lines (29 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Use a Python image with uv
FROM docker.io/library/python:3.12-slim-bookworm
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Setting env
ENV TZ=Asia/Shanghai \
DEBIAN_FRONTEND=noninteractive \
# Enable bytecode compilation
UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy
# use mirrors
# ENV UV_DEFAULT_INDEX="https://mirrors.aliyun.com/pypi/simple"
# use mirrors
# RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib" >> /etc/apt/sources.list\
# && echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib" >> /etc/apt/sources.list\
# && echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib" >> /etc/apt/sources.list\
# && echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib" >> /etc/apt/sources.list
# install nb-cli & playwright
RUN uv pip install --system nb-cli playwright
# install font fonts-noto-color-emoji
RUN apt-get update \
&& apt-get install -y --no-install-recommends fontconfig \
&& rm -rf /tmp/sarasa /tmp/sarasa.7z /var/lib/apt/lists/*
# RUN playwright install --only-shell --with-deps chromium \
# && rm -rf /var/lib/apt/lists/*
# Set workdir `/app`
WORKDIR /app
# Clean uv entrypoint
ENTRYPOINT [""]
CMD ["sh","-c", "./entrypoint.sh"]