nyanya commited on
Commit
60f03ed
β€’
1 Parent(s): 6154b01
Files changed (7) hide show
  1. Dockerfile +14 -0
  2. README.md +3 -3
  3. nginx.conf +1 -1
  4. npm_packages.txt +8 -8
  5. on_startup.sh +2 -19
  6. packages.txt +2 -1
  7. start_server.sh +2 -1
Dockerfile CHANGED
@@ -61,6 +61,20 @@ RUN curl -s https://api.github.com/repos/gitpod-io/openvscode-server/releases/la
61
  && rm -rf /var/lib/apt/lists/* \
62
  && rm -rf /var/tmp/*
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  # Install Node.js and configurable-http-proxy
65
  RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
66
  && apt-get install -y nodejs \
 
61
  && rm -rf /var/lib/apt/lists/* \
62
  && rm -rf /var/tmp/*
63
 
64
+ # Fetch the latest version of OpenVSCode Server
65
+ RUN curl -s https://api.github.com/repos/coder/code-server/releases/latest \
66
+ | grep "browser_download_url.*linux-x64.tar.gz" \
67
+ | cut -d : -f 2,3 \
68
+ | tr -d \" \
69
+ | wget -qi - -O /tmp/code-server.tar.gz && \
70
+ # Install Code Server
71
+ mkdir -p /app/code-server && \
72
+ tar -xzf /tmp/code-server.tar.gz --strip-components=1 -C /app/code-server \
73
+ # Clean up the temporary file
74
+ && rm /tmp/code-server.tar.gz \
75
+ && rm -rf /var/lib/apt/lists/* \
76
+ && rm -rf /var/tmp/*
77
+
78
  # Install Node.js and configurable-http-proxy
79
  RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
80
  && apt-get install -y nodejs \
README.md CHANGED
@@ -1,13 +1,13 @@
1
  ---
2
- title: One-API
3
  emoji: πŸ’»πŸ³
4
  colorFrom: red
5
  colorTo: blue
6
  sdk: docker
7
- pinned: false
8
  tags:
9
  - vscode
10
  duplicated_from: Unsterile/onee
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: Workspace
3
  emoji: πŸ’»πŸ³
4
  colorFrom: red
5
  colorTo: blue
6
  sdk: docker
7
+ pinned: true
8
  tags:
9
  - vscode
10
  duplicated_from: Unsterile/onee
11
  ---
12
 
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
nginx.conf CHANGED
@@ -2,7 +2,7 @@ server {
2
  listen 4444 default_server;
3
  listen [::]:4444 default_server;
4
 
5
- server_name netora.link; # Modify your domain name accordingly
6
 
7
  location / {
8
  # Serve GRADIO 7860
 
2
  listen 4444 default_server;
3
  listen [::]:4444 default_server;
4
 
5
+ server_name _; # Modify your domain name accordingly
6
 
7
  location / {
8
  # Serve GRADIO 7860
npm_packages.txt CHANGED
@@ -1,10 +1,10 @@
1
  cloudflared
2
  localtunnel
3
- code-server --unsafe-perm
4
- @microsoft/1ds-core-js
5
- @vscode/spdlog
6
- yazl
7
- yauzl
8
- minimist
9
- node-pty
10
- xterm-headless
 
1
  cloudflared
2
  localtunnel
3
+ #code-server --unsafe-perm
4
+ #@microsoft/1ds-core-js
5
+ #@vscode/spdlog
6
+ #yazl
7
+ #yauzl
8
+ #minimist
9
+ #node-pty
10
+ #xterm-headless
on_startup.sh CHANGED
@@ -5,22 +5,5 @@
5
  # cd transformers && pip install -e ".[dev]"
6
  # useradd -m aku && adduser aku sudo && echo 'aku:aku' | sudo chpasswd && sed -i 's/\/bin\/sh/\/bin\/bash/g' /etc/passwd
7
  # /usr/bin/newuidmap 1500 0 1000 1 1 100000 65536
8
- cd /usr/lib/node_modules/code-server/lib/vscode/ && npm i . --production --force
9
-
10
- #git clone https://github.com/ckt1031/one-api/
11
-
12
- # Build the frontend
13
- #cd one-api/web
14
- #npm install
15
- #npm run build
16
-
17
- # Build the backend
18
- #cd ..
19
- #export GO111MODULE=on
20
- #export CGO_ENABLED=1
21
- #export GOOS=linux
22
- #python ./i18n/translate.py --repository_path . --json_file_path ./i18n/en.json
23
- #go mod download
24
- #go build -ldflags "-s -w -X 'one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
25
- #chmod u+x one-api
26
- #./one-api --port 3000 --log-dir ./logs
 
5
  # cd transformers && pip install -e ".[dev]"
6
  # useradd -m aku && adduser aku sudo && echo 'aku:aku' | sudo chpasswd && sed -i 's/\/bin\/sh/\/bin\/bash/g' /etc/passwd
7
  # /usr/bin/newuidmap 1500 0 1000 1 1 100000 65536
8
+ #cd /usr/lib/node_modules/code-server/lib/vscode/ && npm i . --production --force
9
+ conda install -c conda-forge gh
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
packages.txt CHANGED
@@ -5,4 +5,5 @@ nginx
5
  autossh
6
  tmux
7
  ripgrep
8
- libsecret-1-dev
 
 
5
  autossh
6
  tmux
7
  ripgrep
8
+ libsecret-1-dev
9
+ lsof
start_server.sh CHANGED
@@ -10,7 +10,8 @@ echo "Starting VSCode Server..."
10
 
11
  #/home/user/one-api/one-api --port 3000 --log-dir ./logs &
12
 
13
- /usr/bin/code-server --bind-addr 0.0.0.0:8080 --auth none --proxy-domain cripp.link &
 
14
 
15
  #echo "Starting Code Tunnel..."
16
  #/usr/bin/code tunnel --accept-server-license-terms &
 
10
 
11
  #/home/user/one-api/one-api --port 3000 --log-dir ./logs &
12
 
13
+ #/usr/bin/code-server --bind-addr 0.0.0.0:8080 --auth none --proxy-domain cripp.link &
14
+ /app/code-server/bin/code-server --bind-addr 0.0.0.0:8080 --auth none --proxy-domain cripp.link &
15
 
16
  #echo "Starting Code Tunnel..."
17
  #/usr/bin/code tunnel --accept-server-license-terms &