Skip to content

Commit

Permalink
Merge pull request containers#19 from ericcurtin/no-multi-stage-build
Browse files Browse the repository at this point in the history
Simplify, no need for a multi-stage build when creating OCI image model
  • Loading branch information
ericcurtin committed Jul 18, 2024
2 parents fadefb6 + b37e68c commit 6f7f5f4
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions ramalama
Original file line number Diff line number Diff line change
Expand Up @@ -335,17 +335,13 @@ list_cli() {
}

build() {
local to="models/$sym_target"
local from="/models/$model_name"
cd "$llm_store"
local from="$sym_target"
local to="/models/$model_name"
cd "$llm_store/models"
local containerfile
containerfile=$(mktemp)
echo "FROM quay.io/ramalama/ramalama:latest AS builder
RUN mkdir -p /models
COPY $to $from
FROM scratch
COPY --from=builder /models /models" > "$containerfile"
echo "FROM scratch
COPY $from $to" > "$containerfile"
"${conman[@]}" build -t "$model_name" -f "$containerfile" .
rm "$containerfile"
cd - > /dev/null
Expand Down

0 comments on commit 6f7f5f4

Please sign in to comment.