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

Fix copy commands #1763

Merged
merged 19 commits into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -630,7 +630,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