Skip to content

Commit 4a4c4d5

Browse files
author
Sophia Guo
committed
remove redundant dependencies
Signed-off-by: Sophia Guo <[email protected]>
1 parent 949b062 commit 4a4c4d5

File tree

2 files changed

+14
-48
lines changed

2 files changed

+14
-48
lines changed

dist/index.js

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3247,58 +3247,41 @@ function installLinuxDepends(version) {
32473247
if (`${ubuntuVersion}` === '16.04') {
32483248
yield exec.exec('sudo apt-get update');
32493249
yield exec.exec('sudo apt-get install -qq -y --no-install-recommends \
3250-
software-properties-common \
32513250
python-software-properties \
32523251
realpath');
32533252
}
3254-
else {
3255-
yield exec.exec('sudo apt-get update');
3256-
yield exec.exec('sudo apt-get install -qq -y --no-install-recommends \
3257-
software-properties-common');
3258-
}
3259-
//Note gcc-multilib is needed on github environment
32603253
yield exec.exec(`sudo apt-get update`);
32613254
yield exec.exec('sudo apt-get install -qq -y --no-install-recommends \
3255+
software-properties-common \
32623256
autoconf \
3263-
ca-certificates \
3264-
ccache \
3265-
cmake \
32663257
cpio \
3267-
file \
3268-
git \
3269-
git-core \
32703258
libasound2-dev \
32713259
libcups2-dev \
32723260
libdwarf-dev \
32733261
libelf-dev \
32743262
libfontconfig1-dev \
32753263
libfreetype6-dev \
3276-
libnuma-dev \
32773264
libx11-dev \
32783265
libxext-dev \
32793266
libxrender-dev \
32803267
libxt-dev \
32813268
libxtst-dev \
32823269
make \
3270+
libnuma-dev \
32833271
nasm \
32843272
pkg-config \
32853273
ssh \
3286-
unzip \
3287-
wget \
3288-
gcc-multilib \
3289-
zip');
3290-
yield io.rmRF(`/var/lib/apt/lists/*`);
3274+
gcc-multilib');
32913275
if (version === '8') {
32923276
yield exec.exec('sudo add-apt-repository ppa:openjdk-r/ppa');
32933277
yield exec.exec(`sudo apt-get update`);
32943278
yield exec.exec('sudo apt-get install -qq -y --no-install-recommends openjdk-7-jdk');
3295-
yield io.rmRF(`/var/lib/apt/lists/*`);
32963279
}
32973280
else {
32983281
yield exec.exec(`sudo apt-get update`);
32993282
yield exec.exec('sudo apt-get install -qq -y --no-install-recommends libxrandr-dev');
3300-
yield io.rmRF(`/var/lib/apt/lists/*`);
33013283
}
3284+
yield io.rmRF(`/var/lib/apt/lists/*`);
33023285
//install cuda9
33033286
const cuda9 = yield tc.downloadTool('https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run');
33043287
yield exec.exec(`sudo sh ${cuda9} --silent --toolkit --override`);

src/builder.ts

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -72,67 +72,50 @@ async function installLinuxDepends(version: string): Promise<void> {
7272
await exec.exec('sudo apt-get update')
7373
await exec.exec(
7474
'sudo apt-get install -qq -y --no-install-recommends \
75-
software-properties-common \
7675
python-software-properties \
7776
realpath'
7877
)
79-
} else {
80-
await exec.exec('sudo apt-get update')
81-
await exec.exec(
82-
'sudo apt-get install -qq -y --no-install-recommends \
83-
software-properties-common'
84-
)
8578
}
86-
//Note gcc-multilib is needed on github environment
79+
8780
await exec.exec(`sudo apt-get update`)
8881
await exec.exec(
8982
'sudo apt-get install -qq -y --no-install-recommends \
83+
software-properties-common \
9084
autoconf \
91-
ca-certificates \
92-
ccache \
93-
cmake \
9485
cpio \
95-
file \
96-
git \
97-
git-core \
9886
libasound2-dev \
9987
libcups2-dev \
10088
libdwarf-dev \
10189
libelf-dev \
10290
libfontconfig1-dev \
10391
libfreetype6-dev \
104-
libnuma-dev \
10592
libx11-dev \
10693
libxext-dev \
10794
libxrender-dev \
10895
libxt-dev \
10996
libxtst-dev \
11097
make \
98+
libnuma-dev \
11199
nasm \
112100
pkg-config \
113101
ssh \
114-
unzip \
115-
wget \
116-
gcc-multilib \
117-
zip'
102+
gcc-multilib'
118103
)
119-
await io.rmRF(`/var/lib/apt/lists/*`)
120104

121105
if (version === '8') {
122106
await exec.exec('sudo add-apt-repository ppa:openjdk-r/ppa')
123107
await exec.exec(`sudo apt-get update`)
124108
await exec.exec(
125109
'sudo apt-get install -qq -y --no-install-recommends openjdk-7-jdk'
126110
)
127-
await io.rmRF(`/var/lib/apt/lists/*`)
128111
} else {
129112
await exec.exec(`sudo apt-get update`)
130113
await exec.exec(
131114
'sudo apt-get install -qq -y --no-install-recommends libxrandr-dev'
132115
)
133-
await io.rmRF(`/var/lib/apt/lists/*`)
134116
}
135-
117+
await io.rmRF(`/var/lib/apt/lists/*`)
118+
136119
//install cuda9
137120
const cuda9 = await tc.downloadTool('https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run')
138121
await exec.exec(`sudo sh ${cuda9} --silent --toolkit --override`)
@@ -229,10 +212,10 @@ async function getBootJdk(version: string): Promise<void> {
229212
}
230213
} else {
231214
// windows jdk is zip file
232-
const tempDir = path.join(tempDirectory, 'temp_' + Math.floor(Math.random() * 2000000000))
233-
await tc.extractZip(bootjdkJar, `${tempDir}`)
234-
const tempJDKDir = path.join(tempDir, fs.readdirSync(tempDir)[0])
235-
await exec.exec(`mv ${tempJDKDir}/* ${workDir}/bootjdk`)
215+
const tempDir = path.join(tempDirectory, 'temp_' + Math.floor(Math.random() * 2000000000))
216+
await tc.extractZip(bootjdkJar, `${tempDir}`)
217+
const tempJDKDir = path.join(tempDir, fs.readdirSync(tempDir)[0])
218+
await exec.exec(`mv ${tempJDKDir}/* ${workDir}/bootjdk`)
236219
}
237220
await io.rmRF(`${bootjdkJar}`)
238221
}

0 commit comments

Comments
 (0)