"""
Both `Service ` and `Job` classes have an argument `env` where you can pass a dictionary. The dictionary keys will be assumed as environment variable names and the values will be the environment variable values.
"""
import logging
from servicefoundry import Build, Service, DockerFileBuild
logging.basicConfig(level=logging.INFO)
service = Service(
name="my-service",
image=Build(build_spec=DockerFileBuild()),
ports=[{"port": 8501}],
env={
"MODEL_FQN": "YOUR MODEL FQN",
"S3_BUCKET_NAME": "my-s3-bucket"
},
)
service.deploy(workspace_fqn="YOUR_WORKSPACE_FQN")