tmp 파일 링크 수정

This commit is contained in:
2026-02-13 08:33:36 +09:00
parent b5ce3ab1fb
commit 8c19c996f7
3 changed files with 17 additions and 12 deletions

View File

@@ -16,6 +16,9 @@ public class TmpDatasetService {
@Value("${train.docker.requestDir}")
private String requestDir;
@Value("${train.docker.basePath}")
private String trainBaseDir;
public String buildTmpDatasetSymlink(String uid, List<String> datasetUids) throws IOException {
log.info("========== buildTmpDatasetHardlink START ==========");
@@ -24,7 +27,7 @@ public class TmpDatasetService {
log.info("requestDir(raw)={}", requestDir);
Path BASE = toPath(requestDir);
Path tmp = Path.of("/home/kcomu/data", "tmp", uid);
Path tmp = Path.of(trainBaseDir, "tmp", uid);
log.info("BASE={}", BASE);
log.info("BASE exists? {}", Files.isDirectory(BASE));
@@ -33,7 +36,7 @@ public class TmpDatasetService {
long noDir = 0, scannedDirs = 0, regularFiles = 0, hardlinksMade = 0;
// tmp 디렉토리 준비
for (String type : List.of("train", "val")) {
for (String type : List.of("train", "val", "test")) {
for (String part : List.of("input1", "input2", "label")) {
Path dir = tmp.resolve(type).resolve(part);
Files.createDirectories(dir);