DEProjTeam07 / coc-model

2 stars 4 forks source link

[Feature] CI/CD 초안 #23

Closed wwkler closed 1 month ago

wwkler commented 1 month ago

이슈 번호 : #10

  1. 배포 관련 폴더 구조와 관련된 설명



  1. Github Action Workflow에서 systemd 방식을 사용해서 프로세스를 컨트롤하고 있는데 이와 관련된 설명

    • sudo systemctl start/stop real_mlflow를 하면 Self Hosted Server에서 참고하는 서비스 파일

    • (Server 4) sudo cat /etc/systemd/system/real_mlflow

      [Unit]
      Description=Real MLflow Tracking Server
      After=network.target
      
      [Service]
      User=ubuntu
      WorkingDirectory=/home/ubuntu/coc-model 
      ExecStart=/home/ubuntu/.pyenv/versions/modelenv-2/bin/mlflow server --host 0.0.0.0 --port 5000
      Environment="PATH=/home/ubuntu/.pyenv/versions/modelenv-2/bin:/usr/bin"
      Restart=always
      StandardOutput=append:/home/ubuntu/deployment/coc-model/logs/real_mlflow_app.log
      StandardError=append:/home/ubuntu/deployment/coc-model/logs/real_mlflow_app_error.log
      
      [Install]
      WantedBy=multi-user.target
    • sudo systemctl start/stop flask_app를 하면 Self Hosted Server에서 참고하는 서비스 파일

    • (Server 4) sudo cat /etc/systemd/system/flask_app

      [Unit]
      Description=Flask Application
      After=network.target
      
      [Service]
      User=ubuntu
      WorkingDirectory=/home/ubuntu/deployment/coc-model
      ExecStart=/home/ubuntu/.pyenv/versions/deployment_env/bin/python /home/ubuntu/deployment/coc-model/flask_app.py
      Environment="PATH=/home/ubuntu/.pyenv/versions/deployment_env/bin:/usr/bin"
      Restart=always
      StandardOutput=append:/home/ubuntu/deployment/coc-model/logs/flask_app.log
      StandardError=append:/home/ubuntu/deployment/coc-model/logs/flask_app_error.log
      
      [Install]
      WantedBy=multi-user.target
      
    • sudo systemctl start/stop streamlit_app 하면 Self Hosted Server에서 참고하는 서비스 파일

    • (Server 4) sudo vi /etc/systemd/system/streamlit_app

      [Unit]
      Description=Streamlit Application
      After=network.target
      
      [Service]
      User=ubuntu
      WorkingDirectory=/home/ubuntu/deployment/coc-model
      ExecStart=/home/ubuntu/.pyenv/versions/deployment_env/bin/streamlit run /home/ubuntu/deployment/coc-model/streamlit_app.py
      Environment="PATH=/home/ubuntu/.pyenv/versions/deployment_env/bin:/usr/bin"
      Restart=always
      StandardOutput=append:/home/ubuntu/deployment/coc-model/logs/streamlit_app.log
      StandardError=append:/home/ubuntu/deployment/coc-model/logs/streamlit_app_error.log
      
      [Install]
      WantedBy=multi-user.target
      
  2. 깊게 봐줬으면 하는 곳

    • flask_app.py해서 mlflow Model Registry에서 Test 1 버전 모델을 가져오고 있는데 이 부분에 대한 피드백이 필요하다.