Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Fix copy commands (#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkSnail authored Nov 22, 2019
1 parent 3caf4ce commit ae36373
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/nni_manager/training_service/common/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
Expand Down

0 comments on commit ae36373

Please sign in to comment.