Skip to content

Commit

Permalink
refact: rename env in runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
brosoul committed Sep 13, 2024
1 parent c9e1972 commit be1248a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
6 changes: 3 additions & 3 deletions docs/tutorial/runtime/runtime-hf-download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ spec:
value: deepseek-ai/deepseek-coder-6.7b-instruct
- name: DOWNLOADER_ALLOW_FILE_SUFFIX
value: json, safetensors
- name: HF_TOKEN
- name: DOWNLOADER_HF_TOKEN
value: <input your hf token, if needed>
- name: HF_ENDPOINT
- name: DOWNLOADER_HF_ENDPOINT
value: <input your hf endpoint, if needed>
- name: HF_REVISION
- name: DOWNLOADER_HF_REVISION
value: <input your mdoel revision, if needed>
volumeMounts:
- mountPath: /models
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorial/runtime/runtime-s3-download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ spec:
value: deepseek-ai/deepseek-coder-6.7b-instruct
- name: DOWNLOADER_ALLOW_FILE_SUFFIX
value: json, safetensors
- name: AWS_ACCESS_KEY_ID
- name: DOWNLOADER_AWS_ACCESS_KEY
value: <input your s3 access key>
- name: AWS_SECRET_ACCESS_KEY
- name: DOWNLOADER_AWS_SECRET_KEY
value: <input your s3 secret key>
- name: AWS_ENDPOINT_URL
- name: DOWNLOADER_AWS_ENDPOINT
value: <input your s3 endpoint>
- name: AWS_REGION
- name: DOWNLOADER_AWS_REGION
value: <input your s3 region>
volumeMounts:
- mountPath: /models
Expand Down
10 changes: 6 additions & 4 deletions docs/tutorial/runtime/runtime-tos-download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,16 @@ spec:
value: deepseek-ai/deepseek-coder-6.7b-instruct
- name: DOWNLOADER_ALLOW_FILE_SUFFIX
value: json, safetensors
- name: TOS_ACCESS_KEY
- name: DOWNLOADER_TOS_ACCESS_KEY
value: <input your tos access key>
- name: TOS_SECRET_KEY
- name: DOWNLOADER_TOS_SECRET_KEY
value: <input your tos secret key>
- name: TOS_ENDPOINT
- name: DOWNLOADER_TOS_ENDPOINT
value: <input your tos endpoint>
- name: TOS_REGION
- name: DOWNLOADER_TOS_REGION
value: <input your tos region>
- name: DOWNLOADER_TOS_ENABLE_CRC
value: "false"
volumeMounts:
- mountPath: /models
name: model-hostpath
Expand Down
24 changes: 12 additions & 12 deletions python/aibrix/aibrix/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ def _parse_int_or_none(value: Optional[str]) -> Optional[int]:
DOWNLOADER_TOS_REGEX = r"^tos://"

# Downloader HuggingFace Envs
DOWNLOADER_HF_TOKEN = os.getenv("HF_TOKEN")
DOWNLOADER_HF_ENDPOINT = os.getenv("HF_ENDPOINT")
DOWNLOADER_HF_REVISION = os.getenv("HF_REVISION")
DOWNLOADER_HF_TOKEN = os.getenv("DOWNLOADER_HF_TOKEN")
DOWNLOADER_HF_ENDPOINT = os.getenv("DOWNLOADER_HF_ENDPOINT")
DOWNLOADER_HF_REVISION = os.getenv("DOWNLOADER_HF_REVISION")

# Downloader TOS Envs
DOWNLOADER_TOS_ACCESS_KEY = os.getenv("TOS_ACCESS_KEY")
DOWNLOADER_TOS_SECRET_KEY = os.getenv("TOS_SECRET_KEY")
DOWNLOADER_TOS_ENDPOINT = os.getenv("TOS_ENDPOINT")
DOWNLOADER_TOS_REGION = os.getenv("TOS_REGION")
DOWNLOADER_TOS_ENABLE_CRC = _is_true(os.getenv("TOS_ENABLE_CRC"))
DOWNLOADER_TOS_ACCESS_KEY = os.getenv("DOWNLOADER_TOS_ACCESS_KEY")
DOWNLOADER_TOS_SECRET_KEY = os.getenv("DOWNLOADER_TOS_SECRET_KEY")
DOWNLOADER_TOS_ENDPOINT = os.getenv("DOWNLOADER_TOS_ENDPOINT")
DOWNLOADER_TOS_REGION = os.getenv("DOWNLOADER_TOS_REGION")
DOWNLOADER_TOS_ENABLE_CRC = _is_true(os.getenv("DOWNLOADER_TOS_ENABLE_CRC"))

# Downloader AWS S3 Envs
DOWNLOADER_AWS_ACCESS_KEY = os.getenv("AWS_ACCESS_KEY_ID")
DOWNLOADER_AWS_SECRET_KEY = os.getenv("AWS_SECRET_ACCESS_KEY")
DOWNLOADER_AWS_ENDPOINT = os.getenv("AWS_ENDPOINT_URL")
DOWNLOADER_AWS_REGION = os.getenv("AWS_REGION")
DOWNLOADER_AWS_ACCESS_KEY = os.getenv("DOWNLOADER_AWS_ACCESS_KEY")
DOWNLOADER_AWS_SECRET_KEY = os.getenv("DOWNLOADER_AWS_SECRET_KEY")
DOWNLOADER_AWS_ENDPOINT = os.getenv("DOWNLOADER_AWS_ENDPOINT")
DOWNLOADER_AWS_REGION = os.getenv("DOWNLOADER_AWS_REGION")

# Metric Standardizing Related Config
# Scrape config
Expand Down

0 comments on commit be1248a

Please sign in to comment.