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

fix: Dockerfile allows conditional full requirements #285

Open
richtong opened this issue Mar 22, 2024 · 3 comments
Open

fix: Dockerfile allows conditional full requirements #285

richtong opened this issue Mar 22, 2024 · 3 comments

Comments

@richtong
Copy link
Contributor

Do you want this fix? basically I need to develop with full requirements sometimes so I modified the dockerfile with a conditional build so the right requirements is copied (also you don't need RUN mkdir, WORKDIR does this already. so docker build --build-arg BUILD=full -t slashgpt . works

ARG BUILD=base

FROM python:3.11.5-bookworm as slashgpt_base
ONBUILD COPY requirements.txt requirements.txt

FROM python:3.11.5-bookworm as slashgpt_full
ONBUILD COPY requirements/full.txt requirements.txt
RUN pip install -r requirements.txt
RUN pip install playsound

FROM slashgpt_${BUILD}
RUN git clone https://github.com/snakajima/SlashGPT.git

WORKDIR /SlashGPT/SlashGPT
COPY .env .env

Also I added something to Makefile as well to make the loop faster so that make docker just drops you into the container :-)

@isamu
Copy link
Collaborator

isamu commented Mar 22, 2024

Thank you!
I would like to merge the docker additions and readme changes.

@richtong
Copy link
Contributor Author

richtong commented Mar 23, 2024 via email

@richtong
Copy link
Contributor Author

richtong commented Mar 23, 2024 via email

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

No branches or pull requests

2 participants