Compare commits
13 Commits
feat/infer
...
83ef7e36ed
| Author | SHA1 | Date | |
|---|---|---|---|
| 83ef7e36ed | |||
| 0d13e6989f | |||
| 4342df9bf5 | |||
| 8f9585b516 | |||
| 43b5a79031 | |||
| 3ba3b05f2f | |||
| fffc2efd96 | |||
| 82e3250fd4 | |||
| 470f2191b7 | |||
| c127531412 | |||
| 61cfd8240a | |||
| 54b6712273 | |||
| b2141e98c0 |
@@ -1,6 +1,5 @@
|
|||||||
# 1단계에서 만든 로컬 베이스 이미지를 사용
|
# 1단계에서 만든 로컬 베이스 이미지를 사용
|
||||||
FROM 192.168.2.73:18082/kamco-cd/base-java21-gdal:1.0
|
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
|
|
||||||
|
|
||||||
# 사용자 설정 (앱 별로 다를 수 있으므로 여기에 유지)
|
# 사용자 설정 (앱 별로 다를 수 있으므로 여기에 유지)
|
||||||
ARG UID=1000
|
ARG UID=1000
|
||||||
|
|||||||
@@ -15,10 +15,6 @@ 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
|
||||||
|
|||||||
@@ -15,11 +15,7 @@ services:
|
|||||||
- SPRING_PROFILES_ACTIVE=dev
|
- SPRING_PROFILES_ACTIVE=dev
|
||||||
- TZ=Asia/Seoul
|
- TZ=Asia/Seoul
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/nfs_share/images:/app/original-images
|
- /data:/kamco-nfs
|
||||||
- /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
|
||||||
|
|||||||
@@ -7,11 +7,14 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@Log4j2
|
@Log4j2
|
||||||
@Component
|
@Component
|
||||||
public class ExternalJarRunner {
|
public class ExternalJarRunner {
|
||||||
|
@Value("${spring.profiles.active}")
|
||||||
|
private String profile;
|
||||||
|
|
||||||
private static final long TIMEOUT_MINUTES = TimeUnit.DAYS.toMinutes(3);
|
private static final long TIMEOUT_MINUTES = TimeUnit.DAYS.toMinutes(3);
|
||||||
|
|
||||||
@@ -40,7 +43,7 @@ public class ExternalJarRunner {
|
|||||||
if (mode != null && !mode.isEmpty()) {
|
if (mode != null && !mode.isEmpty()) {
|
||||||
addArg(args, "converter.mode", mode);
|
addArg(args, "converter.mode", mode);
|
||||||
}
|
}
|
||||||
|
addArg(args, "spring.profiles.active", profile);
|
||||||
execJar(jarPath, args);
|
execJar(jarPath, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,6 +60,7 @@ public class ExternalJarRunner {
|
|||||||
addArg(args, "upload-shp", register);
|
addArg(args, "upload-shp", register);
|
||||||
// addArg(args, "layer", layer);
|
// addArg(args, "layer", layer);
|
||||||
|
|
||||||
|
addArg(args, "spring.profiles.active", profile);
|
||||||
execJar(jarPath, args);
|
execJar(jarPath, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.Page;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -48,6 +49,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody;
|
import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody;
|
||||||
|
|
||||||
@Tag(name = "추론관리", description = "추론관리 API")
|
@Tag(name = "추론관리", description = "추론관리 API")
|
||||||
|
@Log4j2
|
||||||
@RequestMapping("/api/inference")
|
@RequestMapping("/api/inference")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@RestController
|
@RestController
|
||||||
@@ -373,6 +375,7 @@ public class InferenceResultApiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Path zipPath = Path.of(path);
|
Path zipPath = Path.of(path);
|
||||||
|
log.info("shp download request path = {}", path);
|
||||||
|
|
||||||
return downloadExecutor.stream(
|
return downloadExecutor.stream(
|
||||||
new DownloadSpec(uuid, zipPath, uid + ".zip", MediaType.APPLICATION_OCTET_STREAM));
|
new DownloadSpec(uuid, zipPath, uid + ".zip", MediaType.APPLICATION_OCTET_STREAM));
|
||||||
|
|||||||
@@ -134,7 +134,6 @@ 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) {
|
||||||
|
|||||||
@@ -41,21 +41,6 @@ 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;
|
||||||
|
|
||||||
|
|||||||
@@ -35,27 +35,6 @@ 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;
|
||||||
|
|
||||||
|
|||||||
@@ -29,27 +29,12 @@ 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(
|
||||||
|
|||||||
@@ -83,24 +83,25 @@ 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: ${file.sync-root-dir}/tmp
|
sync-tmp-dir: /kamco-nfs/requests/temp # 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: 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/dataset/
|
#dataset-dir: D:/kamco-nfs/model_output/
|
||||||
dataset-dir: /kamco-nfs/dataset/export/
|
dataset-dir: /kamco-nfs/model_output/export/ # 마운트경로 AI 추론결과
|
||||||
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
|
||||||
|
|
||||||
@@ -112,8 +113,8 @@ file:
|
|||||||
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/dataset/shp/shp-exporter.jar
|
jar-path: /kamco-nfs/repo/jar/shp-exporter.jar
|
||||||
inference-server-name: server1,server2,server3,server4
|
inference-server-name: server1,server2,server3,server4
|
||||||
|
|
||||||
gukyuin:
|
gukyuin:
|
||||||
@@ -122,7 +123,7 @@ gukyuin:
|
|||||||
cdi: ${gukyuin.url}/api/kcd/cdi
|
cdi: ${gukyuin.url}/api/kcd/cdi
|
||||||
|
|
||||||
training-data:
|
training-data:
|
||||||
geojson-dir: /kamco-nfs/model_output/labeling/
|
geojson-dir: /kamco-nfs/dataset/request/
|
||||||
|
|
||||||
layer:
|
layer:
|
||||||
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
|
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
|
||||||
|
|||||||
@@ -18,12 +18,38 @@ spring:
|
|||||||
batch_size: 1000 # ✅ 추가 (JDBC batch)
|
batch_size: 1000 # ✅ 추가 (JDBC batch)
|
||||||
|
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:postgresql://10.100.0.10:25432/temp
|
url: jdbc:postgresql://127.0.0.1:15432/kamco_cds
|
||||||
username: temp
|
#url: jdbc:postgresql://localhost:15432/kamco_cds
|
||||||
password: temp123!
|
username: kamco_cds
|
||||||
|
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"
|
||||||
@@ -34,28 +60,39 @@ 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
|
sync-tmp-dir: ${file.sync-root-dir}/tmp # image upload temp dir
|
||||||
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/dataset/
|
#dataset-dir: D:/kamco-nfs/model_output/ #변경 model_output
|
||||||
dataset-dir: /kamco-nfs/dataset/export/
|
dataset-dir: /kamco-nfs/model_output/export/ # 마운트경로 AI 추론결과
|
||||||
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
|
||||||
|
|
||||||
@@ -65,19 +102,18 @@ file:
|
|||||||
dataset-response: /kamco-nfs/dataset/response/
|
dataset-response: /kamco-nfs/dataset/response/
|
||||||
|
|
||||||
inference:
|
inference:
|
||||||
url: http://192.168.2.183:8000/jobs
|
url: http://127.0.0.1:8000/jobs
|
||||||
batch-url: http://192.168.2.183:8000/batches
|
batch-url: http://127.0.0.1:8000/batches
|
||||||
geojson-dir: /kamco-nfs/requests/
|
geojson-dir: /kamco-nfs/requests/ # 학습서버에서 트레이닝한 모델업로드경로
|
||||||
jar-path: /kamco-nfs/dataset/shp/shp-exporter.jar
|
jar-path: /kamco-nfs/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로
|
||||||
inference-server-name: server1,server2,server3,server4
|
inference-server-name: server1,server2,server3,server4
|
||||||
|
|
||||||
gukyuin:
|
gukyuin:
|
||||||
#url: http://localhost:8080
|
url: http://127.0.0.1:5301
|
||||||
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/model_output/labeling/
|
geojson-dir: /kamco-nfs/dataset/request/
|
||||||
|
|
||||||
layer:
|
layer:
|
||||||
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
|
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
|
||||||
|
|||||||
Reference in New Issue
Block a user