hsuwill000 commited on
Commit
0218226
·
verified ·
1 Parent(s): 243525a

Update setup.sh

Browse files
Files changed (1) hide show
  1. setup.sh +13 -12
setup.sh CHANGED
@@ -1,14 +1,15 @@
1
  #!/bin/bash
2
  set -e
3
 
4
- # Remove any third-party apt sources
5
  rm -f /etc/apt/sources.list.d/*.list
6
 
7
- # Update and install base packages
8
  apt-get update && apt-get install -y --no-install-recommends \
9
  curl \
10
  ca-certificates \
11
  sudo \
 
12
  git \
13
  wget \
14
  procps \
@@ -24,21 +25,21 @@ apt-get update && apt-get install -y --no-install-recommends \
24
  libsndfile-dev \
25
  software-properties-common
26
 
27
- # Add nvtop
28
  add-apt-repository ppa:flexiondotorg/nvtop -y
29
  apt-get upgrade -y && apt-get install -y --no-install-recommends nvtop
30
 
31
- # Install Node.js + npm
32
- curl -sL https://deb.nodesource.com/setup_21.x | bash -
33
- apt-get install -y nodejs
34
  npm install -g configurable-http-proxy
35
 
36
- # Install Miniconda (Python 3.9)
37
- curl -sLo ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh
38
- chmod +x ~/miniconda.sh
39
- ~/miniconda.sh -b -p /opt/miniconda
40
- rm ~/miniconda.sh
41
 
42
- # Clean up
43
  apt-get clean
44
  rm -rf /var/lib/apt/lists/*
 
1
  #!/bin/bash
2
  set -e
3
 
4
+ # 移除第三方 apt source
5
  rm -f /etc/apt/sources.list.d/*.list
6
 
7
+ # 基本套件(包含 adduser、sudo)
8
  apt-get update && apt-get install -y --no-install-recommends \
9
  curl \
10
  ca-certificates \
11
  sudo \
12
+ adduser \
13
  git \
14
  wget \
15
  procps \
 
25
  libsndfile-dev \
26
  software-properties-common
27
 
28
+ # nvtop
29
  add-apt-repository ppa:flexiondotorg/nvtop -y
30
  apt-get upgrade -y && apt-get install -y --no-install-recommends nvtop
31
 
32
+ # Node.js + npm(用 NodeSource)
33
+ curl -fsSL https://deb.nodesource.com/setup_21.x | bash -
34
+ apt-get install -y nodejs npm
35
  npm install -g configurable-http-proxy
36
 
37
+ # Miniconda
38
+ curl -sLo /tmp/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-py39_4.10.3-Linux-x86_64.sh
39
+ chmod +x /tmp/miniconda.sh
40
+ /tmp/miniconda.sh -b -p /opt/miniconda
41
+ rm /tmp/miniconda.sh
42
 
43
+ # 清理
44
  apt-get clean
45
  rm -rf /var/lib/apt/lists/*