receptron/SlashGPT

fix: Dockerfile allows conditional full requirements

richtong opened this issue · 3 comments

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 :-)

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