Skip to content

Commit

Permalink
경로 재설정
Browse files Browse the repository at this point in the history
  • Loading branch information
SalkCoding committed Dec 18, 2024
1 parent c9be0c8 commit 4c5123d
Show file tree
Hide file tree
Showing 5 changed files with 1,152 additions and 1,151 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ RUN gradle build --no-daemon
# OpenJDK 17 기반으로 빌드
FROM openjdk:17.0.1-jdk-slim

# debian 기반
# Debian 기반
RUN apt update && apt upgrade -y && apt install -y python3 python3-pip && \
pip3 install pandas scikit-learn xgboost tensorflow && \
apt clean && rm -rf /var/lib/apt/lists/*


# 작업 디렉토리 설정
WORKDIR /app

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
@Service
@RequiredArgsConstructor
public class LotteryAIPriceService {

private final String scriptPath = getClass().getResource("/AI/lottery_prediction.py").getPath();

public String executePythonPredictionScript() {
try {
// Python 스크립트 실행
ProcessBuilder processBuilder = new ProcessBuilder("python3", "/lottery_prediction.py");
ProcessBuilder processBuilder = new ProcessBuilder("python3", scriptPath);
processBuilder.redirectErrorStream(true);
Process process = processBuilder.start();

Expand Down
File renamed without changes.
Loading

0 comments on commit 4c5123d

Please sign in to comment.