Streamlit 앱 배포하기¶
snow streamlit deploy 명령은 선택한 데이터베이스와 스키마 내에 새로운 Streamlit 오브젝트를 생성합니다. 기본적으로 이 명령은 현재 작업 디렉터리에서 이름이 streamlit_app.py 인 기본 파일을 찾습니다.
전제 조건¶
Streamlit 앱을 Snowflake CLI 와 함께 배포하기 전에 다음 필수 구성 요소를 충족해야 합니다
디렉터리 구조가 올바른 로컬 Streamlit 앱이 있는지 확인하고
snowflake.yml프로젝트 정의 파일이 있어야 합니다.Ensure that your account has the correct privileges as described in Privileges required to create and use a Streamlit app.
Streamlit 앱 파일을 업로드할 수 있는 명명된 스테이지를 생성하거나 이 스테이지에 액세스할 수 있는지 확인하십시오.
Streamlit 앱을 배포하는 방법¶
참고
With the release of Snowflake CLI 3.14.0, the snow streamlit deploy command now uses the updated CREATE STREAMLIT syntax (FROM source_location) instead of the deprecated syntax (ROOT_LOCATION = ‘<stage_path_and_root_directory>’). To continue using the deprecated syntax, you can use the --legacy option.
snow streamlit deploy 명령은 로컬 파일을 스테이지에 업로드하고 선택한 데이터베이스와 스키마 내에 새 Streamlit 오브젝트를 생성합니다. 프로젝트 정의 파일 에는 기본 Python 파일과 쿼리 웨어하우스가 지정되어야 합니다. 다음 옵션을 지정할 수도 있습니다.
--replace: 지정된 Streamlit 앱이 이미 있는 경우 이를 대체합니다.--open: 앱을 배포한 후 기본 브라우저에서 Streamlit 앱을 엽니다.--prune: 스테이지에 존재하지만 로컬 파일 시스템에 있는 파일이 아닌 파일을 제거합니다(기본적으로 제거되는 파일은 없음).--legacy: Uses the deprecated SQLsyntax (ROOT_LOCATION = ‘<stage_path_and_root_directory>’).
By default the command automatically deploys the environment.yml file and the content of the pages/
directory, if any of those exists. You can use different files by using command-line options.
Streamlit 앱을 만드는 방법에 대한 자세한 내용은 CLI snow streamlit deploy 및 SQL CREATE STREAMLIT 명령을 참조하십시오.