File tree 1 file changed +30
-35
lines changed
1 file changed +30
-35
lines changed Original file line number Diff line number Diff line change @@ -125,47 +125,42 @@ const runCloud = async (opts) => {
125
125
cloudStartupScript : startupScript ,
126
126
cloudAwsSecurityGroup : awsSecurityGroup ,
127
127
cloudAwsSubnet : awsSubnet ,
128
- tfFile,
129
128
workdir
130
129
} = opts ;
131
130
131
+ if ( gpu === 'tesla' )
132
+ winston . warn (
133
+ 'GPU model "tesla" has been deprecated; please use "v100" instead.'
134
+ ) ;
135
+
132
136
const tfPath = workdir ;
133
137
const tfMainPath = join ( tfPath , 'main.tf' ) ;
134
138
135
- let tpl ;
136
- if ( tfFile ) {
137
- tpl = await fs . writeFile ( tfMainPath , await fs . readFile ( tfFile ) ) ;
138
- } else {
139
- if ( gpu === 'tesla' )
140
- winston . warn (
141
- 'GPU model "tesla" has been deprecated; please use "v100" instead.'
142
- ) ;
143
- tpl = tf . iterativeCmlRunnerTpl ( {
144
- tpiVersion,
145
- repo,
146
- token,
147
- driver,
148
- labels,
149
- cmlVersion,
150
- idleTimeout,
151
- name,
152
- single,
153
- cloud,
154
- region,
155
- type,
156
- permissionSet,
157
- metadata,
158
- gpu : gpu === 'tesla' ? 'v100' : gpu ,
159
- hddSize,
160
- sshPrivate,
161
- spot,
162
- spotPrice,
163
- startupScript,
164
- awsSecurityGroup,
165
- awsSubnet,
166
- dockerVolumes
167
- } ) ;
168
- }
139
+ const tpl = tf . iterativeCmlRunnerTpl ( {
140
+ tpiVersion,
141
+ repo,
142
+ token,
143
+ driver,
144
+ labels,
145
+ cmlVersion,
146
+ idleTimeout,
147
+ name,
148
+ single,
149
+ cloud,
150
+ region,
151
+ type,
152
+ permissionSet,
153
+ metadata,
154
+ gpu : gpu === 'tesla' ? 'v100' : gpu ,
155
+ hddSize,
156
+ sshPrivate,
157
+ spot,
158
+ spotPrice,
159
+ startupScript,
160
+ awsSecurityGroup,
161
+ awsSubnet,
162
+ dockerVolumes
163
+ } ) ;
169
164
170
165
await fs . writeFile ( tfMainPath , tpl ) ;
171
166
await tf . init ( { dir : tfPath } ) ;
You can’t perform that action at this time.
0 commit comments