From 1b036ef9027c3374405eb32b791a55ea3bc00b9b Mon Sep 17 00:00:00 2001 From: Cooper Ry Lees Date: Sat, 31 Dec 2022 16:22:22 -0800 Subject: [PATCH] Fix copy of cogs + models source code - We were not putting the modules in a dir so it was not being included in the install - Fix the COPY directives - Add a `find` run to show the src layout so someone building / looking at logs can inspect easy Ran and got a new error which I will open an issue for using your recent additons ... --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ab591ca..d7a445d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,10 +11,12 @@ RUN pip install --target="/install" --upgrade pip setuptools wheel COPY requirements.txt /install RUN pip install --target="/install" -r requirements.txt COPY README.md /src -COPY cogs /src -COPY models /src +COPY cogs /src/cogs +COPY models /src/models COPY gpt3discord.py /src COPY pyproject.toml /src +# For debugging + seeing that the modiles file layouts look correct ... +find /src RUN pip install --target="/install" /src # Copy minimal to main image (to keep as small as possible) @@ -22,4 +24,4 @@ FROM python:${PY_VERSION}-slim ARG PY_VERSION COPY --from=builder /install /usr/local/lib/python${PY_VERSION}/site-packages COPY gpt3discord.py /bin/gpt3discord -CMD ["python3", "/bin/gpt3discord"] \ No newline at end of file +CMD ["python3", "/bin/gpt3discord"]