Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring .gitignore so examples/chatbot-ui-manual/models doesn't show in git status #1065

Closed
jamesbraza opened this issue Sep 15, 2023 · 6 comments
Assignees
Labels
kind/question Further information is requested

Comments

@jamesbraza
Copy link
Contributor

When I make this repo a git submodule and then download a GGUF model to examples/chatbot-ui-manual/models, it shows up in my git status:

 ~/code/repo/LocalAI | on master > git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	examples/chatbot-ui-manual/models/llama-2-13b-chat.Q4_K_S.gguf

Can we configure this repo's .gitignore such that adding models to examples/xyz/models doesn't lead to a dirty git status?

@jamesbraza jamesbraza added the bug Something isn't working label Sep 15, 2023
@jamesbraza
Copy link
Contributor Author

Looks like examples/slack-bot uses a symlink to models/ to solve this problem. It may be simplest to use the same symlink strategy in examples/chatbot-ui/chatbot-ui-manual

@localai-bot
Copy link
Contributor

⚠️⚠️⚠️⚠️⚠️

Hi! I'm a bot running with LocalAI ( a crazy experiment of @mudler ) - please beware that I might hallucinate sometimes!

but.... I can also be funny or helpful 😸 and I can provide generally speaking good tips or places where to look after in the documentation or in the code based on what you wrote in the issue.

Don't engage in conversation with me,
I don't support (yet) replying!

⚠️⚠️⚠️⚠️⚠️

Yes, you can add the path to the models directory in your .gitignore file to exclude it from being tracked by Git. Here is an example of what your .gitignore file could look like:

# Ignore all files and directories in /examples/ except for the build directory
/examples/*
! /examples/build
# Ignore models directory
models/

This will exclude all files and directories in the /examples/ directory except for the build directory, and also specifically exclude the models directory. This should ensure that adding a model to the models directory does not show up as untracked in your git status.

Sources:

@jamesbraza
Copy link
Contributor Author

Thank you @localai-bot, though Ideally the default of the .gitignore just works, no need to manually tweak it.

@Aisuko Aisuko added enhancement New feature or request kind/question Further information is requested and removed bug Something isn't working enhancement New feature or request labels Oct 2, 2023
@Aisuko
Copy link
Collaborator

Aisuko commented Oct 2, 2023

Hi @jamesbraza According to your comment. It looks like there is no issue. I'm going to close this issue now.

@Aisuko Aisuko closed this as completed Oct 2, 2023
@jamesbraza
Copy link
Contributor Author

@Aisuko I think you misinterpreted my response to the bot, this issue persists. Can you reopen this?

This issue was about making the .gitignore apply to any models/ directory in the repo

@jamesbraza
Copy link
Contributor Author

@Aisuko opened a PR that will resolve this now, thanks for reopening!

mudler pushed a commit that referenced this issue Oct 2, 2023
Closes #1066 and
#1065

Standardizes all `examples/`:
- Models in one place (other than `rwkv`, which was one-offy)
- Env files as `.env.example` with `cp`
    - Also standardizes comments and links docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants