0. 환경세팅
postgresql 사용시(우분투) : pip install psycopg2-binary
1. S3 버킷 생성
버킷 생성은 아래 참고하시면 될듯합니다.
2023.02.10 - [Cloud] - [AWS] S3 소개 및 버킷 생성부터 파일 업로드 다운로드까지
2. 환경변수 설정
아래 엔드포인트 유알엘에서 s3-{버킷리전} 적어주시면 됩니다.
$ ~/.profile
export MLFLOW_S3_ENDPOINT_URL=https://s3-ap-northeast-2.amazonaws.com
export AWS_ACCESS_KEY_ID=''
export AWS_SECRET_ACCESS_KEY=''
export MLFLOW_S3_IGNORE_TLS=true
export MLFLOW_TRACKING_URI=postgresql+psycopg2://postgres:postgres@localhost:5432/mlflow_db
$ source ~/.profile
3. postgresql 설치
#postgresql 컨테이너 생성 및 실행
$ docker run --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 -h localhost -d postgres
#컨테이너 접속
$ docker exec -it postgres bash
# DBMS접속
$ psql -U postgres
#db생성 : 위의 환경변수와 동일한 이름의 db 생성
$ create database mlflow_db;
4. mlflow server
$ mlflow server --backend-store-uri postgresql://postgres:postgres@localhost:5432/mlflow_db --default-artifact-root s3://버킷이름 --host localhost
댓글