Compare commits
6 Commits
a9b49faa6c
...
develop
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50ad05b53b | ||
|
|
822dbb252f | ||
|
|
5e04df73af | ||
| 650b1695f0 | |||
| 960e4215e0 | |||
| 08a220db4d |
@@ -232,12 +232,7 @@ public class ModelTrainMngService {
|
|||||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
|
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
if (!Files.isSymbolicLink(file)) {
|
// 파일은 전부 허용 (일반 + symlink)
|
||||||
log.error("tmp 내부에 일반 파일 존재: {}", file);
|
|
||||||
throw new CustomApiException(
|
|
||||||
"BAD_REQUEST", HttpStatus.BAD_REQUEST, "tmp 내부는 symlink만 허용");
|
|
||||||
}
|
|
||||||
|
|
||||||
return FileVisitResult.CONTINUE;
|
return FileVisitResult.CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,10 +240,11 @@ public class ModelTrainMngService {
|
|||||||
public FileVisitResult preVisitDirectory(Path directory, BasicFileAttributes attrs)
|
public FileVisitResult preVisitDirectory(Path directory, BasicFileAttributes attrs)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
|
// 루트 제외 + symlink 디렉토리 금지
|
||||||
if (!directory.equals(dir) && Files.isSymbolicLink(directory)) {
|
if (!directory.equals(dir) && Files.isSymbolicLink(directory)) {
|
||||||
log.error("tmp 내부에 symlink 디렉토리 존재: {}", directory);
|
log.error("tmp 내부에 symlink 디렉토리 존재: {}", directory);
|
||||||
throw new CustomApiException(
|
throw new CustomApiException(
|
||||||
"BAD_REQUEST", HttpStatus.BAD_REQUEST, "tmp 내부에 symlink 디렉토리 금지");
|
"BAD_REQUEST", HttpStatus.BAD_REQUEST, "tmp 내부에 symlink 디렉토리는 허용되지 않습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return FileVisitResult.CONTINUE;
|
return FileVisitResult.CONTINUE;
|
||||||
|
|||||||
@@ -260,8 +260,8 @@ public class DockerTrainService {
|
|||||||
c.add("NCCL_SOCKET_IFNAME=eth0");
|
c.add("NCCL_SOCKET_IFNAME=eth0");
|
||||||
|
|
||||||
// 요청/결과 디렉토리 볼륨 마운트
|
// 요청/결과 디렉토리 볼륨 마운트
|
||||||
c.add("-v");
|
// c.add("-v");
|
||||||
c.add(basePath + ":" + basePath); // 심볼릭 링크와 연결되는 실제 파일 경로도 마운트를 해줘야 함
|
// c.add(basePath + ":" + basePath); // 심볼릭 링크와 연결되는 실제 파일 경로도 마운트를 해줘야 함
|
||||||
c.add("-v");
|
c.add("-v");
|
||||||
c.add(basePath + "/tmp:/data");
|
c.add(basePath + "/tmp:/data");
|
||||||
c.add("-v");
|
c.add("-v");
|
||||||
|
|||||||
@@ -127,12 +127,15 @@ public class UploadDto {
|
|||||||
@Schema(description = "상태", example = "UPLOADING")
|
@Schema(description = "상태", example = "UPLOADING")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
// TODO 미사용시작
|
||||||
@Schema(description = "총 청크 수", example = "100")
|
@Schema(description = "총 청크 수", example = "100")
|
||||||
private Integer totalChunks;
|
private Integer totalChunks;
|
||||||
|
|
||||||
@Schema(description = "업로드된 청크 수", example = "50")
|
@Schema(description = "업로드된 청크 수", example = "50")
|
||||||
private Integer uploadedChunks;
|
private Integer uploadedChunks;
|
||||||
|
|
||||||
|
// TODO 미사용 끝
|
||||||
|
|
||||||
@Schema(description = "진행률 (%)", example = "50.0")
|
@Schema(description = "진행률 (%)", example = "50.0")
|
||||||
private Double progress;
|
private Double progress;
|
||||||
|
|
||||||
|
|||||||
@@ -26,15 +26,6 @@ public class UploadService {
|
|||||||
|
|
||||||
private final UploadSessionCoreService uploadSessionCoreService;
|
private final UploadSessionCoreService uploadSessionCoreService;
|
||||||
|
|
||||||
@Value("${file.sync-root-dir}")
|
|
||||||
private String syncRootDir;
|
|
||||||
|
|
||||||
@Value("${file.sync-tmp-dir}")
|
|
||||||
private String syncTmpDir;
|
|
||||||
|
|
||||||
@Value("${file.sync-file-extention}")
|
|
||||||
private String syncFileExtention;
|
|
||||||
|
|
||||||
@Value("${file.dataset-dir}")
|
@Value("${file.dataset-dir}")
|
||||||
private String datasetDir;
|
private String datasetDir;
|
||||||
|
|
||||||
|
|||||||
@@ -48,22 +48,22 @@ swagger:
|
|||||||
local-port: 9080
|
local-port: 9080
|
||||||
|
|
||||||
file:
|
file:
|
||||||
sync-root-dir: /app/original-images/
|
# sync-root-dir: /app/original-images/
|
||||||
sync-tmp-dir: ${file.sync-root-dir}tmp/
|
# sync-tmp-dir: ${file.sync-root-dir}tmp/
|
||||||
sync-file-extention: tfw,tif
|
# sync-file-extention: tfw,tif
|
||||||
|
|
||||||
dataset-dir: /home/kcomu/data/request/
|
dataset-dir: /data/request/
|
||||||
dataset-tmp-dir: ${file.dataset-dir}tmp/
|
dataset-tmp-dir: ${file.dataset-dir}tmp/
|
||||||
|
|
||||||
pt-path: /home/kcomu/data/response/v6-cls-checkpoints/
|
pt-path: /data/response/v6-cls-checkpoints/
|
||||||
pt-FileName: yolov8_6th-6m.pt
|
pt-FileName: yolov8_6th-6m.pt
|
||||||
|
|
||||||
train:
|
train:
|
||||||
docker:
|
docker:
|
||||||
image: kamco-cd-train:latest
|
image: kamco-cd-train:latest
|
||||||
requestDir: /home/kcomu/data/request
|
requestDir: /data/request
|
||||||
responseDir: /home/kcomu/data/response
|
responseDir: /data/response
|
||||||
basePath: /home/kcomu/data
|
basePath: /data
|
||||||
containerPrefix: kamco-cd-train
|
containerPrefix: kamco-cd-train
|
||||||
shmSize: 16g
|
shmSize: 16g
|
||||||
ipcHost: true
|
ipcHost: true
|
||||||
|
|||||||
Reference in New Issue
Block a user