Documentation
¶
Index ¶
- Variables
- type CondaLoader
- type CondaLoaderOptions
- type GitLoader
- type GitLoaderOptions
- type HTTPLoader
- type HTTPLoaderOptions
- type HuggingFaceLoader
- type HuggingFaceLoaderOptions
- type Loader
- type ModelScopeLoader
- type ModelScopeLoaderOptions
- type Options
- type PixiLoader
- type S3Loader
- type S3LoaderOptions
- type SecretKey
- type Secrets
- type Type
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SupportedTypesString = []string{string(TypeS3), string(TypeGit), string(TypeHTTP), string(TypeConda), string(TypeHuggingFace), string(TypeModelScope)} SupportedTypes = []Type{TypeS3, TypeGit, TypeHTTP, TypeConda, TypeHuggingFace, TypeModelScope} )
Functions ¶
This section is empty.
Types ¶
type CondaLoader ¶
type CondaLoader struct {
Options Options
// contains filtered or unexported fields
}
func NewCondaLoader ¶
func (*CondaLoader) Sync ¶
func (l *CondaLoader) Sync(_ string, _ string) error
Workflow overview:
- conda --version
- conda info
- conda env list
- conda config --show-sources
- conda config --set show_channel_urls yes
- conda config --prepend pkgs_dirs /opt/baize-runtime-env/conda/pkgs
- conda config --prepend envs_dirs /opt/baize-runtime-env/conda/envs
if environment.yml exists:
- read environment.yml
- normalize environment.yml
- conda env create -f environment.yml
- conda clean --all
else:
- create a normalized environment.yml
- conda env create -f environment.yml
- conda clean --all
if requirements.txt exists:
- pip install -r requirements.txt
finalize the conda environment:
- mv /opt/baize-runtime-env/conda/pkgs ${mount-root}/conda/pkgs
- mv /opt/baize-runtime-env/conda/envs ${mount-root}/conda/envs
type CondaLoaderOptions ¶
type CondaLoaderOptions struct {
Name string `json:"name"`
PythonVersion string `json:"pythonVersion"`
PipIndexURL string `json:"pipIndexUrl"`
PipExtraIndexURL string `json:"pipExtraIndexUrl"`
CondaEnvironmentYmlPath string `json:"condaEnvironmentYmlPath"`
PipRequirementsTxtPath string `json:"pipRequirementsTxtPath"`
CondaPrefixDir string `json:"condaPrefixDir"`
// contains filtered or unexported fields
}
type GitLoader ¶
type GitLoader struct {
Options Options
// contains filtered or unexported fields
}
func NewGitLoader ¶
type GitLoaderOptions ¶
type HTTPLoader ¶
type HTTPLoader struct {
Options Options
// contains filtered or unexported fields
}
func NewHTTPLoader ¶
type HTTPLoaderOptions ¶
type HTTPLoaderOptions struct {
SyncMode string `json:"syncMode"`
// contains filtered or unexported fields
}
type HuggingFaceLoader ¶
type HuggingFaceLoader struct {
Options Options
// contains filtered or unexported fields
}
func NewHuggingFaceLoader ¶
type ModelScopeLoader ¶
type ModelScopeLoader struct {
Options Options
// contains filtered or unexported fields
}
func NewModelScopeLoader ¶
type ModelScopeLoaderOptions ¶
type PixiLoader ¶ added in v0.1.3
type PixiLoader struct {
Options Options
}
func NewPixiLoader ¶ added in v0.1.3
type S3Loader ¶
type S3Loader struct {
Options Options
// contains filtered or unexported fields
}
func NewS3Loader ¶
type S3LoaderOptions ¶
type SecretKey ¶
type SecretKey string
const ( SecretKeyUsername SecretKey = "username" SecretKeyPassword SecretKey = "password" SecretKeyPrivateKey SecretKey = "ssh-privatekey" SecretKeyPrivateKeyPassphrase SecretKey = "ssh-privatekey-passphrase" // #nosec G101 SecretKeyToken SecretKey = "token" SecretKeyAccessKey SecretKey = "access-key" SecretKeySecretKey SecretKey = "secret-key" )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.