wangyikunkun commited on
Commit
dff1b6f
·
verified ·
1 Parent(s): efc5f9e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM eclipse-temurin:23-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 curl python3 python3-venv python3-pip tar zip && \
10
+ apt-get clean && \
11
+ rm -rf /var/lib/apt/lists/*
12
+
13
+ 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
14
+
15
+ RUN mkdir -p ~/.halo2
16
+
17
+ ENV VIRTUAL_ENV=/opt/venv
18
+ RUN python3 -m venv $VIRTUAL_ENV
19
+ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
20
+ RUN pip install --no-cache-dir huggingface_hub
21
+
22
+ COPY sync_data.sh /opt/halo/
23
+ RUN chmod +x /opt/halo/sync_data.sh
24
+
25
+ EXPOSE 8090
26
+
27
+ CMD ["bash", "/opt/halo/sync_data.sh"]