2 Commits

11 changed files with 116 additions and 64 deletions

View File

@@ -1,5 +1,6 @@
# 1단계에서 만든 로컬 베이스 이미지를 사용 # 1단계에서 만든 로컬 베이스 이미지를 사용
FROM 127.0.0.1:18082/kamco-cd/base-java21-gdal:1.0 FROM 192.168.2.73:18082/kamco-cd/base-java21-gdal:1.0
FROM 192.168.2.73:18082/kamco-cd/base-java21-gdal:1.0
# 사용자 설정 (앱 별로 다를 수 있으므로 여기에 유지) # 사용자 설정 (앱 별로 다를 수 있으므로 여기에 유지)
ARG UID=1000 ARG UID=1000

View File

@@ -15,6 +15,10 @@ services:
- SPRING_PROFILES_ACTIVE=dev - SPRING_PROFILES_ACTIVE=dev
- TZ=Asia/Seoul - TZ=Asia/Seoul
volumes: volumes:
- /mnt/nfs_share/images:/app/original-images
- /mnt/nfs_share/model_output:/app/model-outputs
- /mnt/nfs_share/train_dataset:/app/train-dataset
- /mnt/nfs_share/tmp:/app/tmp
- /kamco-nfs:/kamco-nfs - /kamco-nfs:/kamco-nfs
networks: networks:
- kamco-cds - kamco-cds

View File

@@ -15,7 +15,11 @@ services:
- SPRING_PROFILES_ACTIVE=dev - SPRING_PROFILES_ACTIVE=dev
- TZ=Asia/Seoul - TZ=Asia/Seoul
volumes: volumes:
- /data:/kamco-nfs - /mnt/nfs_share/images:/app/original-images
- /mnt/nfs_share/model_output:/app/model-outputs
- /mnt/nfs_share/train_dataset:/app/train-dataset
- /mnt/nfs_share/tmp:/app/tmp
- /kamco-nfs:/kamco-nfs
networks: networks:
- kamco-cds - kamco-cds
restart: unless-stopped restart: unless-stopped

View File

@@ -134,6 +134,7 @@ public class MapSheetMngService {
} }
MngDto mngDto = mapSheetMngCoreService.findMapSheetMng(errDto.getMngYyyy()); MngDto mngDto = mapSheetMngCoreService.findMapSheetMng(errDto.getMngYyyy());
String targetYearDir = mngDto.getMngPath();
// 중복체크 -> 도엽50k/uuid 경로에 업로드 할 거라 overwrite 되지 않음 // 중복체크 -> 도엽50k/uuid 경로에 업로드 할 거라 overwrite 되지 않음
// if (!overwrite) { // if (!overwrite) {

View File

@@ -41,6 +41,21 @@ public class ModelMngApiController {
private final ModelMngService modelMngService; private final ModelMngService modelMngService;
@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}")
private String datasetDir;
@Value("${file.dataset-tmp-dir}")
private String datasetTmpDir;
@Value("${file.model-dir}") @Value("${file.model-dir}")
private String modelDir; private String modelDir;

View File

@@ -35,6 +35,27 @@ public class ModelMngService {
private final UploadService uploadService; private final UploadService uploadService;
@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}")
private String datasetDir;
@Value("${file.dataset-tmp-dir}")
private String datasetTmpDir;
@Value("${file.model-dir}")
private String modelDir;
@Value("${file.model-tmp-dir}")
private String modelTmpDir;
@Value("${file.pt-path}") @Value("${file.pt-path}")
private String ptPath; private String ptPath;

View File

@@ -306,6 +306,10 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
queryFactory queryFactory
.select(labelingAssignmentEntity.count()) .select(labelingAssignmentEntity.count())
.from(labelingAssignmentEntity) .from(labelingAssignmentEntity)
.innerJoin(mapSheetAnalInferenceEntity)
.on(
labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id),
mapSheetAnalInferenceEntity.analState.ne(LabelMngState.FINISH.getId()))
.where(labelingAssignmentEntity.workerUid.eq(userId)) .where(labelingAssignmentEntity.workerUid.eq(userId))
.fetchOne(); .fetchOne();
@@ -326,6 +330,10 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
queryFactory queryFactory
.select(labelingAssignmentEntity.count()) .select(labelingAssignmentEntity.count())
.from(labelingAssignmentEntity) .from(labelingAssignmentEntity)
.innerJoin(mapSheetAnalInferenceEntity)
.on(
labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id),
mapSheetAnalInferenceEntity.analState.ne(LabelMngState.FINISH.getId()))
.where( .where(
labelingAssignmentEntity.workerUid.eq(userId), labelingAssignmentEntity.workerUid.eq(userId),
labelingAssignmentEntity.workState.eq("ASSIGNED")) labelingAssignmentEntity.workState.eq("ASSIGNED"))
@@ -354,6 +362,10 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
queryFactory queryFactory
.select(labelingAssignmentEntity.count()) .select(labelingAssignmentEntity.count())
.from(labelingAssignmentEntity) .from(labelingAssignmentEntity)
.innerJoin(mapSheetAnalInferenceEntity)
.on(
labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id),
mapSheetAnalInferenceEntity.analState.ne(LabelMngState.FINISH.getId()))
.where( .where(
labelingAssignmentEntity.workerUid.eq(userId), labelingAssignmentEntity.workerUid.eq(userId),
labelingAssignmentEntity.workState.in( labelingAssignmentEntity.workState.in(

View File

@@ -314,6 +314,10 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
queryFactory queryFactory
.select(labelingAssignmentEntity.count()) .select(labelingAssignmentEntity.count())
.from(labelingAssignmentEntity) .from(labelingAssignmentEntity)
.innerJoin(mapSheetAnalInferenceEntity)
.on(
labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id),
mapSheetAnalInferenceEntity.analState.ne(LabelMngState.FINISH.getId()))
.where(labelingAssignmentEntity.inspectorUid.eq(userId)) .where(labelingAssignmentEntity.inspectorUid.eq(userId))
.fetchOne(); .fetchOne();
@@ -334,6 +338,10 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
queryFactory queryFactory
.select(labelingAssignmentEntity.count()) .select(labelingAssignmentEntity.count())
.from(labelingAssignmentEntity) .from(labelingAssignmentEntity)
.innerJoin(mapSheetAnalInferenceEntity)
.on(
labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id),
mapSheetAnalInferenceEntity.analState.ne(LabelMngState.FINISH.getId()))
.where( .where(
labelingAssignmentEntity.inspectorUid.eq(userId), labelingAssignmentEntity.inspectorUid.eq(userId),
labelingAssignmentEntity.inspectState.eq("UNCONFIRM")) labelingAssignmentEntity.inspectState.eq("UNCONFIRM"))
@@ -362,6 +370,10 @@ public class TrainingDataReviewRepositoryImpl extends QuerydslRepositorySupport
queryFactory queryFactory
.select(labelingAssignmentEntity.count()) .select(labelingAssignmentEntity.count())
.from(labelingAssignmentEntity) .from(labelingAssignmentEntity)
.innerJoin(mapSheetAnalInferenceEntity)
.on(
labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id),
mapSheetAnalInferenceEntity.analState.ne(LabelMngState.FINISH.getId()))
.where( .where(
labelingAssignmentEntity.inspectorUid.eq(userId), labelingAssignmentEntity.inspectorUid.eq(userId),
labelingAssignmentEntity.inspectState.in("COMPLETE", "EXCEPT"), labelingAssignmentEntity.inspectState.in("COMPLETE", "EXCEPT"),

View File

@@ -29,12 +29,27 @@ public class UploadApiController {
private final UploadService uploadService; private final UploadService uploadService;
@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;
@Value("${file.dataset-tmp-dir}") @Value("${file.dataset-tmp-dir}")
private String datasetTmpDir; private String datasetTmpDir;
@Value("${file.model-dir}")
private String modelDir;
@Value("${file.model-tmp-dir}")
private String modelTmpDir;
/* /*
@Operation(summary = "데이터셋 대용량 업로드 세션 시작", description = "데이터셋 대용량 파일 업로드 세션을 시작합니다.") @Operation(summary = "데이터셋 대용량 업로드 세션 시작", description = "데이터셋 대용량 파일 업로드 세션을 시작합니다.")
@ApiResponses( @ApiResponses(

View File

@@ -83,36 +83,37 @@ mapsheet:
upload: upload:
skipGdalValidation: true skipGdalValidation: true
shp: shp:
baseurl: /app/tmp/detect/result #현재사용안함 baseurl: /app/tmp/detect/result
file: file:
#sync-root-dir: D:/kamco-nfs/images/ #sync-root-dir: D:/kamco-nfs/images/
sync-root-dir: /kamco-nfs/images/ sync-root-dir: /kamco-nfs/images/
sync-tmp-dir: /kamco-nfs/requests/temp # image upload temp dir 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
sync-auto-exception-start-year: 2024 sync-auto-exception-start-year: 2024
sync-auto-exception-before-year-cnt: 3 sync-auto-exception-before-year-cnt: 3
#dataset-dir: D:/kamco-nfs/model_output/ #dataset-dir: D:/kamco-nfs/dataset/
dataset-dir: /kamco-nfs/model_output/export/ # 마운트경로 AI 추론결과 dataset-dir: /kamco-nfs/dataset/export/
dataset-tmp-dir: ${file.dataset-dir}tmp/ dataset-tmp-dir: ${file.dataset-dir}tmp/
#model-dir: D:/kamco-nfs/ckpt/model/ #model-dir: D:/kamco-nfs/ckpt/model/
model-dir: /kamco-nfs/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로 model-dir: /kamco-nfs/ckpt/model/
model-tmp-dir: ${file.model-dir}tmp/ model-tmp-dir: ${file.model-dir}tmp/
model-file-extention: pth,json,py model-file-extention: pth,json,py
pt-path: /kamco-nfs/ckpt/model/v6-cls-checkpoints/ pt-path: /kamco-nfs/ckpt/model/v6-cls-checkpoints/
pt-FileName: yolov8_6th-6m.pt pt-FileName: yolov8_6th-6m.pt
dataset-response: /kamco-nfs/dataset/response/
inference: inference:
url: http://192.168.2.183:8000/jobs url: http://192.168.2.183:8000/jobs
batch-url: http://192.168.2.183:8000/batches batch-url: http://192.168.2.183:8000/batches
geojson-dir: /kamco-nfs/requests/ # 추론실행을 위한 파일생성경로 geojson-dir: /kamco-nfs/requests/
jar-path: /kamco-nfs/repo/jar/shp-exporter.jar jar-path: /kamco-nfs/dataset/shp/shp-exporter.jar
inference-server-name: server1,server2,server3,server4 inference-server-name: server1,server2,server3,server4
gukyuin: gukyuin:
@@ -121,7 +122,7 @@ gukyuin:
cdi: ${gukyuin.url}/api/kcd/cdi cdi: ${gukyuin.url}/api/kcd/cdi
training-data: training-data:
geojson-dir: /kamco-nfs/dataset/request/ geojson-dir: /kamco-nfs/model_output/labeling/
layer: layer:
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com geoserver-url: https://kamco.geo-dev.gs.dabeeo.com

View File

@@ -18,38 +18,12 @@ spring:
batch_size: 1000 # ✅ 추가 (JDBC batch) batch_size: 1000 # ✅ 추가 (JDBC batch)
datasource: datasource:
url: jdbc:postgresql://127.0.0.1:15432/kamco_cds url: jdbc:postgresql://10.100.0.10:25432/temp
#url: jdbc:postgresql://localhost:15432/kamco_cds username: temp
username: kamco_cds password: temp123!
password: kamco_cds_Q!W@E#R$
hikari: hikari:
minimum-idle: 10 minimum-idle: 10
maximum-pool-size: 20 maximum-pool-size: 20
connection-timeout: 60000 # 60초 연결 타임아웃
idle-timeout: 300000 # 5분 유휴 타임아웃
max-lifetime: 1800000 # 30분 최대 수명
leak-detection-threshold: 60000 # 연결 누수 감지
transaction:
default-timeout: 300 # 5분 트랜잭션 타임아웃
data:
redis:
host: 127.0.0.1
port: 16379
password: kamco
servlet:
multipart:
enabled: true
max-file-size: 4GB
max-request-size: 4GB
file-size-threshold: 10MB
server:
tomcat:
max-swallow-size: 4GB
max-http-form-post-size: 4GB
jwt: jwt:
secret: "kamco_token_9b71e778-19a3-4c1d-97bf-2d687de17d5b" secret: "kamco_token_9b71e778-19a3-4c1d-97bf-2d687de17d5b"
@@ -60,58 +34,50 @@ token:
refresh-cookie-name: kamco # 개발용 쿠키 이름 refresh-cookie-name: kamco # 개발용 쿠키 이름
refresh-cookie-secure: true # 로컬 http 테스트면 false refresh-cookie-secure: true # 로컬 http 테스트면 false
logging:
level:
root: INFO
org.springframework.web: DEBUG
org.springframework.security: DEBUG
# 헬스체크 노이즈 핵심만 다운
org.springframework.security.web.FilterChainProxy: INFO
org.springframework.security.web.authentication.AnonymousAuthenticationFilter: INFO
org.springframework.security.web.authentication.Http403ForbiddenEntryPoint: INFO
org.springframework.web.servlet.DispatcherServlet: INFO
mapsheet: mapsheet:
upload: upload:
skipGdalValidation: true skipGdalValidation: true
shp: shp:
baseurl: /app/detect/result #현재사용안함 baseurl: /app/detect/result
file: file:
#sync-root-dir: D:/kamco-nfs/images/ #sync-root-dir: D:/kamco-nfs/images/
sync-root-dir: /kamco-nfs/images/ sync-root-dir: /kamco-nfs/images/
sync-tmp-dir: ${file.sync-root-dir}/tmp # image upload temp dir sync-tmp-dir: ${file.sync-root-dir}/tmp
sync-file-extention: tfw,tif sync-file-extention: tfw,tif
sync-auto-exception-start-year: 2025 sync-auto-exception-start-year: 2025
sync-auto-exception-before-year-cnt: 3 sync-auto-exception-before-year-cnt: 3
#dataset-dir: D:/kamco-nfs/model_output/ #변경 model_output #dataset-dir: D:/kamco-nfs/dataset/
dataset-dir: /kamco-nfs/model_output/export/ # 마운트경로 AI 추론결과 dataset-dir: /kamco-nfs/dataset/export/
dataset-tmp-dir: ${file.dataset-dir}tmp/ dataset-tmp-dir: ${file.dataset-dir}tmp/
#model-dir: D:/kamco-nfs/ckpt/model/ #model-dir: D:/kamco-nfs/ckpt/model/
model-dir: /kamco-nfs/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로 model-dir: /kamco-nfs/ckpt/model/
model-tmp-dir: ${file.model-dir}tmp/ model-tmp-dir: ${file.model-dir}tmp/
model-file-extention: pth,json,py model-file-extention: pth,json,py
pt-path: /kamco-nfs/ckpt/model/v6-cls-checkpoints/ pt-path: /kamco-nfs/ckpt/model/v6-cls-checkpoints/
pt-FileName: yolov8_6th-6m.pt pt-FileName: yolov8_6th-6m.pt
dataset-response: /kamco-nfs/dataset/response/
inference: inference:
url: http://127.0.0.1:8000/jobs url: http://192.168.2.183:8000/jobs
batch-url: http://127.0.0.1:8000/batches batch-url: http://192.168.2.183:8000/batches
geojson-dir: /kamco-nfs/requests/ # 학습서버에서 트레이닝한 모델업로드경로 geojson-dir: /kamco-nfs/requests/
jar-path: /kamco-nfs/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로 jar-path: /kamco-nfs/dataset/shp/shp-exporter.jar
inference-server-name: server1,server2,server3,server4 inference-server-name: server1,server2,server3,server4
gukyuin: gukyuin:
url: http://127.0.0.1:5301 #url: http://localhost:8080
url: http://192.168.2.129:5301
cdi: ${gukyuin.url}/api/kcd/cdi cdi: ${gukyuin.url}/api/kcd/cdi
training-data: training-data:
geojson-dir: /kamco-nfs/dataset/request/ geojson-dir: /kamco-nfs/model_output/labeling/
layer: layer:
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com geoserver-url: https://kamco.geo-dev.gs.dabeeo.com