-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (29 loc) · 932 Bytes
/
Dockerfile
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
FROM nikolaik/python-nodejs:python3.10-nodejs20
# 添加 CACHEBUST 参数
ARG CACHEBUST=1
ENV USER=pn \
HOMEDIR=/home/pn \
PORT=7860 \
SSHX_INSTALL=true \
GRADIO_SERVER_NAME="0.0.0.0" \
GIT_REPO="https://github.com/aigem/hf-novu" \
PROJECT_NAME="aigem-novu"
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-utils \
build-essential \
libpq-dev \
git \
curl \
vim \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR ${HOMEDIR}
# 克隆项目到 ${HOMEDIR}/${PROJECT_NAME}
RUN git clone ${GIT_REPO} ${HOMEDIR}/${PROJECT_NAME} \
&& chmod +x ${HOMEDIR}/${PROJECT_NAME}/src/*.sh \
&& if [ "$SSHX_INSTALL" = true ]; then ${HOMEDIR}/${PROJECT_NAME}/src/sshx.sh; fi \
&& ${HOMEDIR}/${PROJECT_NAME}/src/novu.sh
# 暴露 Remix 端口
EXPOSE ${PORT}
# 在启动时设置 API_KEY 环境变量
ENTRYPOINT ${HOMEDIR}/${PROJECT_NAME}/src/startup.sh