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

chore(docker): dockerfiles improvements and fixes #1792

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

qdm12
Copy link

@qdm12 qdm12 commented Mar 25, 2024

  • UID and GID build arguments for worker user. This is useful to not have to change permissions on bind mounted directories.
  • POETRY_EXTRAS build argument with default values. Useful to re-build the image with some extras using --build-arg POETRY_EXTRAS="..."
  • Copy Makefile in Docker image so commands such as make ingest can be used
  • Do NOT copy markdown files. I doubt anyone reads a markdown file within a Docker image
  • Fix PYTHONPATH value where path should be /home/worker/app/private_gpt instead of /private_gpt
  • Set home directory to /home/worker when creating user. This resolves a bunch of side dependencies warnings/problems.
  • Combine ENV instructions together. Just a tiny bit faster to rebuild.
  • Define environment variables with their defaults
    • For documentation purposes
    • Reflect defaults set in settings-docker.yml
  • PGPT_EMBEDDING_MODE to define embedding mode. It's not always the same mode as the llm.
  • Remove ineffective python3 -m pipx ensurepath (does not work and is fulfilled by ENV PATH="/root/.local/bin:$PATH")
  • Use && instead of ; to chain commands to detect failure better

Next PRs (after this one gets merged):

  1. merge both Dockerfile together. Highly possible especially given the new build argument POETRY_EXTRAS.
  2. Add missing openai variables and definitions in settings-docker.yaml
  3. Add docker documentation
  4. Pick up Fix docker compose up and MacBook segfault #1428

@szastavnyy
Copy link

Hello All. Please clarify what command is better to use to build docker image locally, upload to GCP and use ? I do not see useful info in documentation related to docker creation

@qdm12
Copy link
Author

qdm12 commented Apr 4, 2024

@szastavnyy see #1789 (comment)

@qdm12
Copy link
Author

qdm12 commented May 6, 2024

@zylon-ai I keep on updating this branch, it would be nice to have a review at some point. Thanks 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants