ERROR418 commited on
Commit
19cb1a3
·
verified ·
1 Parent(s): 67fe7ce

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM eclipse-temurin:17-jre
2
+
3
+ WORKDIR /opt/halo
4
+
5
+ ENV TZ=Asia/Shanghai
6
+ ENV JVM_OPTS="-Xmx256m -Xms256m"
7
+
8
+ RUN apt-get update && \
9
+ apt-get install -y wget python3 python3-venv python3-pip tar gzip jq curl && \
10
+ apt-get clean && \
11
+ rm -rf /var/lib/apt/lists/*
12
+
13
+ RUN curl -sL https://api.github.com/repos/halo-dev/halo/releases/latest | \
14
+ jq -r '.assets[] | select(.name | test(".jar$")) | .browser_download_url' | \
15
+ xargs curl -L -o halo.jar
16
+
17
+ RUN mkdir -p ~/.halo2
18
+
19
+ ENV VIRTUAL_ENV=/opt/venv
20
+ RUN python3 -m venv $VIRTUAL_ENV
21
+ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
22
+ RUN pip install --no-cache-dir huggingface_hub
23
+
24
+ COPY sync_data.sh /opt/halo/
25
+ RUN chmod +x /opt/halo/sync_data.sh
26
+
27
+ EXPOSE 8090
28
+
29
+ CMD ["/bin/sh", "-c", "/opt/halo/sync_data.sh"]