Unverified Commit ae36373c authored by SparkSnail's avatar SparkSnail Committed by GitHub
Browse files

Fix copy commands (#1763)

parent 3caf4cec
......@@ -89,7 +89,7 @@ export async function execCopydir(source: string, destination: string): Promise<
if (process.platform === 'win32') {
await cpp.exec(`powershell.exe Copy-Item "${source}" -Destination "${destination}" -Recurse`);
} else {
await cpp.exec(`cp -r '${source}' '${destination}'`);
await cpp.exec(`cp -r '${source}/.' '${destination}'`);
}
return Promise.resolve();
......
......@@ -599,7 +599,7 @@ class RemoteMachineTrainingService implements TrainingService {
await execMkdir(path.join(trialLocalTempFolder, '.nni'));
//create tmp trial working folder locally.
await execCopydir(path.join(this.trialConfig.codeDir, '*'), trialLocalTempFolder);
await execCopydir(this.trialConfig.codeDir, trialLocalTempFolder);
const installScriptContent : string = CONTAINER_INSTALL_NNI_SHELL_FORMAT;
// Write NNI installation file to local tmp files
await fs.promises.writeFile(path.join(trialLocalTempFolder, 'install_nni.sh'), installScriptContent, { encoding: 'utf8' });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment