4PEb6b commited on
Commit
2a6c1d5
·
verified ·
1 Parent(s): 67c7855

Upload 3 files

Browse files
Files changed (3) hide show
  1. Dockerfile +25 -0
  2. README.md +4 -3
  3. launch.sh +13 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:latest
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apt update \
6
+ && apt-get install -y curl unzip wget gnupg2 ca-certificates supervisor
7
+
8
+ ENV GBP_USER ${GBP_USER:-gbp}
9
+ ENV GBP_USER_ID ${GBP_USER_ID:-1000}
10
+ USER root
11
+
12
+
13
+ ADD launch.sh ./launch.sh
14
+ RUN chmod 777 /app && chmod 777 /app/launch.sh
15
+
16
+ RUN wget -q -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.gpg >/dev/null \
17
+ && echo "deb https://packages.microsoft.com/repos/edge stable main" >> /etc/apt/sources.list.d/microsoft-edge.list \
18
+ && apt-get update -qqy \
19
+ && apt-get -qqy --no-install-recommends install microsoft-edge-stable
20
+
21
+ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash \
22
+ && apt-get install -y nodejs
23
+ RUN apt-get clean && rm -rf /var/lib/apt/lists/*
24
+
25
+ CMD /app/launch.sh
README.md CHANGED
@@ -1,10 +1,11 @@
1
  ---
2
  title: Helper
3
- emoji: 📚
4
- colorFrom: blue
5
- colorTo: blue
6
  sdk: docker
7
  pinned: false
 
8
  ---
9
 
10
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
  title: Helper
3
+ emoji: 😻
4
+ colorFrom: gray
5
+ colorTo: yellow
6
  sdk: docker
7
  pinned: false
8
+ app_port: 3000
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
launch.sh ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/sh
2
+
3
+ BASE=/app
4
+ NAME=coze
5
+
6
+ cd $BASE
7
+ curl -s "$fetch" -o helper.zip && unzip helper.zip
8
+
9
+ cd $BASE/${NAME}-helper
10
+ sed -i 's/puppeteerArgs\.push/\/\/ puppeteerArgs\.push/g' src/index.ts
11
+ sed -i 's/headless: false,/headless: "new",/g' src/index.ts
12
+
13
+ npm install && npm run start