Skip to content

Add docker local builds#69

Open
CrackerJackMack wants to merge 1 commit intoaipack-ai:mainfrom
CrackerJackMack:docker
Open

Add docker local builds#69
CrackerJackMack wants to merge 1 commit intoaipack-ai:mainfrom
CrackerJackMack:docker

Conversation

@CrackerJackMack
Copy link
Copy Markdown

Might be useful for some. The aip alias is what makes it usable. Tried to keep it in-line with the documentation for the variables. Directories target and .git are ignored when building the image just due to size. The trade off is a slightly longer build time but gives consistent results.

Using a two stage build, the final docker image is < 50MB with an intermediate build of ~3GB which can be freed up with docker image prune.

kevin@Kevin-mint:~/dev/aipack$ source docker/docker-alias 
kevin@Kevin-mint:~/dev/aipack$ 
kevin@Kevin-mint:~/dev/aipack$ alias aip
alias aip='_aip() { docker run --rm -u `id -u` -it -e COHERE_API_KEY=$COHERE_API_KEY -e OPENAI_API_KEY=$OPENAI_API_KEY -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY  -e GEMINI_API_KEY=$GEMINI_API_KEY -e FIREWORKS_API_KEY=$FIREWORKS_API_KEY -e TOGETHER_API_KEY=$TOGETHER_API_KEY -e NEBIUS_API_KEY=$NEBIUS_API_KEY -e XAI_API_KEY=$XAI_API_KEY -e DEEPSEEK_API_KEY=$DEEPSEEK_API_KEY -e GROQ_API_KEY=$GROQ_API_KEY -v `pwd`:/app aipack:${AIPACK_VERSION:-latest} $@;} ; _aip'
kevin@Kevin-mint:~/dev/aipack$ echo $OPENAI_API_KEY
palantir
kevin@Kevin-mint:~/dev/aipack$ aip check-keys

Available API Keys:

✔  OPENAI_API_KEY

Other possible API Keys: ANTHROPIC_API_KEY, GEMINI_API_KEY, FIREWORKS_API_KEY, TOGETHER_API_KEY, NEBIUS_API_KEY, XAI_API_KEY, DEEPSEEK_API_KEY, GROQ_API_KEY, COHERE_API_KEY

@jeremychone
Copy link
Copy Markdown
Collaborator

@CrackerJackMack This is cool. I need to make aip more server-friendly, right now -s is okay, but much more can be done.

But this is a good idea. Let me think about this.

@jeremychone jeremychone added the in-discussion Issue, question, or requirement in dicussion. label Mar 25, 2026
@CrackerJackMack
Copy link
Copy Markdown
Author

This wasn't intended as a server, but could be used that way when aip has it. I just hate having all different types of build and runtime environments for all the different languages and versioning quirks.

@jeremychone
Copy link
Copy Markdown
Collaborator

@CrackerJackMack Ok, I get it. So, this intent is a little out of scope for this library right now. But as you say, it could be useful to some.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-discussion Issue, question, or requirement in dicussion. out-of-scope

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants