File size: 705 Bytes
dff1b6f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM eclipse-temurin:23-jre

WORKDIR /opt/halo

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

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

RUN curl -s https://api.github.com/repos/halo-dev/halo/releases/latest | grep "browser_download_url" | grep "\.jar\"" | cut -d '"' -f 4 | 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 ["bash", "/opt/halo/sync_data.sh"]