From 21ddeb1c9329a635a5bb6f9489ab06a98c363b3c Mon Sep 17 00:00:00 2001 From: Sterling Dreyer Date: Mon, 20 Jan 2025 11:32:23 -0800 Subject: [PATCH] Fix dev container builds (#212) --- docker/Dockerfile | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index c8d91780..28f7d194 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -28,16 +28,26 @@ RUN apt-get update && apt-get install -y \ WORKDIR /app/arcade # Copy the parent directory contents into the container -COPY ../dist /app/arcade/ +COPY ./dist ./arcade /app/arcade/ # List files for debugging purposes -RUN ls -lah /app/arcade/ - - -# Install the wheel with extras (not evals for now) -RUN python -m pip install ./arcade_ai-${VERSION}-py3-none-any.whl fastapi -RUN python -m pip install -r ./requirements.txt +RUN ls -la /app/arcade/ +# Conditional installation based on version +RUN if [ ! "$(echo ${VERSION} | grep -E '\.dev0$')" ]; then \ + echo "Installing wheel file" && \ + python -m pip install ./arcade_ai-${VERSION}-py3-none-any.whl fastapi && \ + python -m pip install -r ./requirements.txt; \ + else \ + echo "Installing from source" && \ + cd /app/arcade && \ + pip install poetry && \ + poetry lock && \ + poetry version 0.1.0 && \ + pip install fastapi && \ + pip install -r requirements.txt && \ + pip install .; \ + fi # Expose the port EXPOSE $PORT