Skip to content

fix an error with multistage symlinks #1307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 20, 2023
Merged

Conversation

technillogue
Copy link
Contributor

There's this error that can happen

 => ERROR [stage-1 6/7] RUN ln --force -s /dep/* $(pyenv prefix)/lib/python*/site-packages                                                                                 0.5s
------
 > [stage-1 6/7] RUN ln --force -s /dep/* $(pyenv prefix)/lib/python*/site-packages:
0.390 ln: /root/.pyenv/versions/3.11.5/lib/python3.11/site-packages/_distutils_hack: cannot overwrite directory
0.391 ln: /root/.pyenv/versions/3.11.5/lib/python3.11/site-packages/pkg_resources: cannot overwrite directory
0.392 ln: /root/.pyenv/versions/3.11.5/lib/python3.11/site-packages/setuptools: cannot overwrite directory
0.392 ln: /root/.pyenv/versions/3.11.5/lib/python3.11/site-packages/wheel: cannot overwrite directory
0.392 ln: /root/.pyenv/versions/3.11.5/lib/python3.11/site-packages/wheel-0.41.2.dist-info: cannot overwrite directory
------

It's caused by some basic packages already being installed and ln not willing to do directories even with --force. It will still process everything else, so ||true seems like a good enough fix, but rm -rf $(pyenv prefix)/lib/python*/site-packages/* would work just as well.

Signed-off-by: technillogue <technillogue@gmail.com>
@mattt mattt merged commit f806bf1 into main Sep 20, 2023
@mattt mattt deleted the syl/more-fix-multistage-symlinks branch September 20, 2023 16:17
mattt added a commit that referenced this pull request Sep 22, 2023
Squashed commit of the following:

commit fd72b03
Author: Mattt <mattt@replicate.com>
Date:   Fri Sep 22 05:54:06 2023 -0700

    Allow `Union` and `List` input types (#1311)

    * Allow Union and List input types

    Signed-off-by: Mattt Zmuda <mattt@replicate.com>

    * Update TypeError messages to note support for Union and List types

    Signed-off-by: Mattt Zmuda <mattt@replicate.com>

    ---------

    Signed-off-by: Mattt Zmuda <mattt@replicate.com>

commit 6123056
Author: Mattt <mattt@replicate.com>
Date:   Thu Sep 21 13:21:00 2023 -0700

    Add support for text/markdown / .md files (#1310)

    Signed-off-by: Mattt Zmuda <mattt@replicate.com>

commit aa7aa77
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu Sep 21 13:20:46 2023 -0700

    Bump gotest.tools/gotestsum from 1.10.1 to 1.11.0 (#1306)

    Bumps [gotest.tools/gotestsum](https://github.com/gotestyourself/gotestsum) from 1.10.1 to 1.11.0.
    - [Release notes](https://github.com/gotestyourself/gotestsum/releases)
    - [Commits](gotestyourself/gotestsum@v1.10.1...v1.11.0)

    ---
    updated-dependencies:
    - dependency-name: gotest.tools/gotestsum
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit f806bf1
Author: technillogue <technillogue@gmail.com>
Date:   Wed Sep 20 12:17:24 2023 -0400

    ||true (#1307)

    Signed-off-by: technillogue <technillogue@gmail.com>

commit 8487137
Author: Nick Stenning <nick@whiteink.com>
Date:   Thu Sep 14 14:19:09 2023 -0700

    Override sys.argv while importing predictor module (#1304)

    In production, any sys.argv should not be exposed to user code. Partly
    because this might leak information about the production environment,
    but primarily because user code often has its own argument parsing code
    which gets confused when it sees our arguments to cog/server/http.py.

    This uses mock.patch to ensure that sys.argv contains just sys.argv[0]
    when user code is executing.

    Even though we (Cog) have already done all argument parsing long before
    this executes, we also put the original value back once we're done
    running user code.

    Signed-off-by: Nick Stenning <nick@whiteink.com>

commit 0e3af7b
Author: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Date:   Tue Sep 12 03:48:07 2023 -0700

    add technillogue as a contributor for code (#1256)

    * update README.md [skip ci]

    * update .all-contributorsrc [skip ci]

    ---------

    Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

Signed-off-by: Mattt Zmuda <mattt@replicate.com>
mattt added a commit that referenced this pull request Sep 22, 2023
Signed-off-by: Mattt Zmuda <mattt@replicate.com>

Squashed commit of the following:

commit fd72b03
Author: Mattt <mattt@replicate.com>
Date:   Fri Sep 22 05:54:06 2023 -0700

    Allow `Union` and `List` input types (#1311)

    * Allow Union and List input types

    Signed-off-by: Mattt Zmuda <mattt@replicate.com>

    * Update TypeError messages to note support for Union and List types

    Signed-off-by: Mattt Zmuda <mattt@replicate.com>

    ---------

    Signed-off-by: Mattt Zmuda <mattt@replicate.com>

commit 6123056
Author: Mattt <mattt@replicate.com>
Date:   Thu Sep 21 13:21:00 2023 -0700

    Add support for text/markdown / .md files (#1310)

    Signed-off-by: Mattt Zmuda <mattt@replicate.com>

commit aa7aa77
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu Sep 21 13:20:46 2023 -0700

    Bump gotest.tools/gotestsum from 1.10.1 to 1.11.0 (#1306)

    Bumps [gotest.tools/gotestsum](https://github.com/gotestyourself/gotestsum) from 1.10.1 to 1.11.0.
    - [Release notes](https://github.com/gotestyourself/gotestsum/releases)
    - [Commits](gotestyourself/gotestsum@v1.10.1...v1.11.0)

    ---
    updated-dependencies:
    - dependency-name: gotest.tools/gotestsum
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit f806bf1
Author: technillogue <technillogue@gmail.com>
Date:   Wed Sep 20 12:17:24 2023 -0400

    ||true (#1307)

    Signed-off-by: technillogue <technillogue@gmail.com>

commit 8487137
Author: Nick Stenning <nick@whiteink.com>
Date:   Thu Sep 14 14:19:09 2023 -0700

    Override sys.argv while importing predictor module (#1304)

    In production, any sys.argv should not be exposed to user code. Partly
    because this might leak information about the production environment,
    but primarily because user code often has its own argument parsing code
    which gets confused when it sees our arguments to cog/server/http.py.

    This uses mock.patch to ensure that sys.argv contains just sys.argv[0]
    when user code is executing.

    Even though we (Cog) have already done all argument parsing long before
    this executes, we also put the original value back once we're done
    running user code.

    Signed-off-by: Nick Stenning <nick@whiteink.com>

commit 0e3af7b
Author: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Date:   Tue Sep 12 03:48:07 2023 -0700

    add technillogue as a contributor for code (#1256)

    * update README.md [skip ci]

    * update .all-contributorsrc [skip ci]

    ---------

    Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

Signed-off-by: Mattt Zmuda <mattt@replicate.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants