Skip to content

Commit

Permalink
🦄 refactor(docker): Refactor Dockerfile to simplify installation of d…
Browse files Browse the repository at this point in the history
…ependencies
  • Loading branch information
AndPuQing committed Feb 25, 2024
1 parent 24fd946 commit 4e2969d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/backend.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ COPY ./app/pyproject.toml ./app/poetry.lock* /app/

# Allow installing dev dependencies to run tests
ARG INSTALL_DEV=false
RUN sh -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --only main ; fi"
RUN sh -c "poetry run python -m pip install --no-use-pep517 rectools[lightfm]"
RUN if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --only main ; fi
RUN poetry run python -m pip install --no-use-pep517 rectools[lightfm]

COPY ./app /app

Expand Down
4 changes: 2 additions & 2 deletions backend/celeryworker.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ COPY ./app/pyproject.toml ./app/poetry.lock* /app/

# Allow installing dev dependencies to run tests
ARG INSTALL_DEV=false
RUN sh -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --only main ; fi"
RUN sh -c "poetry run python -m pip install --no-use-pep517 rectools[lightfm]"
RUN if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --only main ; fi
RUN poetry run python -m pip install --no-use-pep517 rectools[lightfm]

ENV C_FORCE_ROOT=1

Expand Down

0 comments on commit 4e2969d

Please sign in to comment.