FROM opendrift/opendrift:latest WORKDIR /app # gunicorn 설치 추가 RUN pip install fastapi uvicorn gunicorn # 결과 데이터 저장 폴더 추가 RUN mkdir -p /app/result COPY . . EXPOSE 5003 # gunicorn으로 실행 CMD ["gunicorn", "api:app", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:5003"] ## 빌드 명령어 # docker build -t opendrift-api . ## 실행 명령어 (로컬 데이터 폴더를 컨테이너의 /storage로 마운트) # docker run -d -p 5003:5003 -v /devdata/services/prediction/data:/storage -e STORAGE_BASE=/storage --name opendrift-api opendrift-api