Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions instill/helpers/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ RUN for package in ${PACKAGES}; do \
done;

WORKDIR /home/ray
COPY --link --exclude=model.py . .
COPY model.py model.py
COPY --chown=ray:users --exclude=model.py . .
COPY --chown=ray:users model.py model.py
14 changes: 9 additions & 5 deletions instill/helpers/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def build_image():
"-t",
"--tag",
help="tag for the model image",
default="",
default=hashlib.sha256().hexdigest(),
required=False,
)
parser.add_argument(
Expand Down Expand Up @@ -64,13 +64,17 @@ def build_image():

build = config["build"]
repo = config["repo"]
tag = args.tag if args.tag != "" else hashlib.sha256().hexdigest()

python_version = build["python_version"].replace(".", "")
ray_version = ray.__version__
instill_version = instill.__version__

cuda_suffix = "" if not build["gpu"] else "-cu121"
if not build["gpu"]:
cuda_suffix = ""
elif "cuda_version" in build and not build["cuda_version"] is None:
cuda_suffix = f'-cu{build["cuda_version"].replace(".", "")}'
else:
cuda_suffix = "-gpu"

system_str = ""
if "system_packages" in build and not build["system_packages"] is None:
Expand Down Expand Up @@ -116,7 +120,7 @@ def build_image():
"--platform",
f"linux/{args.target_arch}",
"-t",
f"{repo}:{tag}",
f"{repo}:{args.tag}",
tmpdir,
"--load",
]
Expand All @@ -126,7 +130,7 @@ def build_image():
command,
check=True,
)
Logger.i(f"[Instill Builder] {repo}:{tag} built")
Logger.i(f"[Instill Builder] {repo}:{args.tag} built")
except subprocess.CalledProcessError:
Logger.e("[Instill Builder] Build failed")
except Exception as e:
Expand Down