Skip to content

Commit

Permalink
test publish
Browse files Browse the repository at this point in the history
  • Loading branch information
yanxi0830 committed Jan 14, 2025
1 parent 0aab982 commit bfb9848
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/publish-to-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ jobs:
run: |
llama stack build --template ollama --image-type docker
docker images
- name: Push to dockerhub
run: |
docker push localhost/distribution-ollama llamastack/distribution-ollama:0.0.63-test
1 change: 0 additions & 1 deletion llama_stack/distribution/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ def build_image(
return_code = run_with_pty(args)
else:
return_code = run_command(args)
print("return code", return_code)

if return_code != 0:
log.error(
Expand Down
8 changes: 1 addition & 7 deletions llama_stack/distribution/utils/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,9 @@ def handle_io():
def run_command(command):
try:
result = subprocess.run(command, capture_output=True, text=True, check=True)
print("Script Output:", result.stdout)
print("Script Output\n", result.stdout)
return result.returncode
except subprocess.CalledProcessError as e:
print("Error running script:", e)
print("Error output:", e.stderr)
return e.returncode
# process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# output, error = process.communicate()
# if process.returncode != 0:
# log.error(f"Error: {error.decode('utf-8')}")
# sys.exit(1)
# return output.decode("utf-8")

0 comments on commit bfb9848

Please sign in to comment.