Spaces:
Running
Running
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"] | |