Open
Conversation
NayakwadiR
approved these changes
Aug 31, 2024
samchenghowing
approved these changes
Sep 3, 2024
samchenghowing
left a comment
There was a problem hiding this comment.
Fix for pull-model $HOME panic for ollama docker image after June
| (let [[v _] (async/alts! [done (async/timeout 5000)])] | ||
| (if (= :stop v) :stopped (do (println (format "... pulling model (%ss) - will take several minutes" (* n 10))) (recur (inc n)))))) | ||
| (process/shell {:env {"OLLAMA_HOST" url} :out :inherit :err :inherit} (format "bash -c './bin/ollama show %s --modelfile > /dev/null || ./bin/ollama pull %s'" llm llm)) | ||
| (process/shell {:env {"OLLAMA_HOST" url "HOME" (System/getProperty "user.home")} :out :inherit :err :inherit} (format "bash -c './bin/ollama show %s --modelfile > /dev/null || ./bin/ollama pull %s'" llm llm)) |
There was a problem hiding this comment.
Suggested change
| (process/shell {:env {"OLLAMA_HOST" url "HOME" (System/getProperty "user.home")} :out :inherit :err :inherit} (format "bash -c './bin/ollama show %s --modelfile > /dev/null || ./bin/ollama pull %s'" llm llm)) | |
| (process/shell {:env {"OLLAMA_HOST" url "HOME" "/root"} :out :inherit :err :inherit} (format "bash -c './bin/ollama show %s --modelfile > /dev/null || ./bin/ollama pull %s'" llm llm)) |
There was a problem hiding this comment.
Please check this approach
Raphael-Marchetti-Calciolari
left a comment
There was a problem hiding this comment.
Maybe manually setting it to "root" could work better among all OS, the other approach didn't work on my Mac M1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References:
#176
samchenghowing/Web-Study-Platform-with-GenAI-Stack@437ad2a
There is a fix for this mentioned in #175 but it doesn't seem to be added. This is a minimal change to add this fix to main.