DiffDock icon indicating copy to clipboard operation
DiffDock copied to clipboard

Fixed multi-stage docker build mamba env copy paths

Open jacquayj opened this issue 11 months ago • 2 comments

Resolves error:

=> ERROR [stage-1 4/9] COPY --from=builder --chown=appuser:appuser /home/appuser/micromamba /home/appuser/micromamba                                                                                                                                                   0.0s
------
 > [stage-1 4/9] COPY --from=builder --chown=appuser:appuser /home/appuser/micromamba /home/appuser/micromamba:
------
Dockerfile:43
--------------------
  41 |     
  42 |     # Copy the Conda environment and application code from the builder stage
  43 | >>> COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/micromamba $HOME/micromamba
  44 |     COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/bin $HOME/bin
  45 |     COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/$DIR_NAME $HOME/$DIR_NAME
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref 9428aca3-383b-4a6f-862c-d3eef5b31344::mi9m9scluvmxcsatnrz0ge8p4: "/home/appuser/micromamba": not found

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/8inf24d4zcpc8zj0rktkm6zcx

I suspect the behavior of micromamba changed since it wasn't pinned to a particular version:

# Install micromamba
RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xj bin/micromamba
  • Updated Dockerfile

jacquayj avatar Jan 30 '25 17:01 jacquayj

I still get that error => ERROR [stage-1 4/9] COPY --from=builder --chown=appuser:appuser /home/appuser/micromamba /home/appuser/micromamba 0.0s

[stage-1 4/9] COPY --from=builder --chown=appuser:appuser /home/appuser/micromamba /home/appuser/micromamba:


Dockerfile:43

41 |
42 | # Copy the Conda environment and application code from the builder stage 43 | >>> COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/micromamba $HOME/micromamba 44 | COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/bin $HOME/bin 45 | COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/$DIR_NAME $HOME/$DIR_NAME

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref FDU5:GMVN:3T37:XOMW:AQIC:DVFR:TVIV:LM4T:OP7M:T652:24RI:YIUJ::tgn0s2kl0oe9k7n1t78enip3k: "/home/appuser/micromamba": not found

IstiaqAnsari avatar Feb 11 '25 22:02 IstiaqAnsari

Hi @IstiaqAnsari - looks like your Docker build is still using the main branch with the erroneous:

COPY --from=builder --chown=$APPUSER:$APPUSER $HOME/micromamba $HOME/micromamba

Try to checkout this branch and see if that resolves the error for you.

jacquayj avatar Feb 12 '25 00:02 jacquayj