Spaces:
Running
Running
File size: 1,565 Bytes
eb67e7b |
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
FROM node:19.1.0-alpine3.16
# Arguments
ARG APP_HOME=/home/node/app
# Install system dependencies
RUN apk add gcompat tini git jq curl
# Ensure proper handling of kernel signals
ENTRYPOINT [ "tini", "--" ]
# Create app directory
WORKDIR ${APP_HOME}
# Env
ENV fetch ""
# Install app dependencies
# COPY package*.json post-install.js ./
RUN git clone https://github.com/SillyTavern/SillyTavern.git --branch 1.12.6 .
RUN \
echo "*** Install npm packages ***" && \
npm install && npm cache clean --force
# Bundle app source
# COPY . ./
ADD launch.sh launch.sh
RUN curl -JLO https://github.com/bincooo/SillyTavern-Docker/releases/download/v1.0.0/git-batch
RUN chmod +x launch.sh && chmod +x git-batch && ./git-batch -h
ADD ["OpenAI Settings", "data/default-user/OpenAI Settings"]
ADD ["QuickReplies", "data/default-user/QuickReplies"]
ADD secrets.json data/default-user/secrets.json
# 启动设置
ADD config.yaml config.yaml
# 服务设置
ADD settings.json data/default-user/settings.json
# 导入角色卡
ADD characters data/default-user/characters
# Cleanup unnecessary files
RUN \
echo "*** Cleanup ***" && \
mv "./docker/docker-entrypoint.sh" "./" && \
rm -rf "./docker" && \
echo "*** Make docker-entrypoint.sh executable ***" && \
chmod +x "./docker-entrypoint.sh" && \
echo "*** Convert line endings to Unix format ***" && \
dos2unix "./docker-entrypoint.sh"
RUN sed -i 's/# Start the server/.\/launch.sh env \&\& .\/launch.sh init/g' docker-entrypoint.sh
RUN chmod -R 777 ${APP_HOME}
EXPOSE 8000
CMD [ "./docker-entrypoint.sh" ] |