File size: 752 Bytes
44323e4
19cb1a3
 
 
 
 
 
 
 
 
 
 
ddc8d5e
19cb1a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM eclipse-temurin:21-jre

WORKDIR /opt/halo

ENV TZ=Asia/Shanghai
ENV JVM_OPTS="-Xmx256m -Xms256m"

RUN apt-get update && \
    apt-get install -y wget python3 python3-venv python3-pip tar gzip jq curl  && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

RUN curl -sL https://api.github.com/repos/halo-dev/halo/releases/tags/v2.21.3 | \
    jq -r '.assets[] | select(.name | test(".jar$")) | .browser_download_url' | \
    xargs curl -L -o halo.jar

RUN mkdir -p ~/.halo2

ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --no-cache-dir huggingface_hub

COPY sync_data.sh /opt/halo/
RUN chmod +x /opt/halo/sync_data.sh

EXPOSE 8090

CMD ["/bin/sh", "-c", "/opt/halo/sync_data.sh"]