forked from prefix-dev/pixi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/pixi-global
- Loading branch information
Showing
31 changed files
with
1,785 additions
and
231 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,8 @@ authors: | |
name-particle: de | ||
family-names: Jager | ||
email: [email protected] | ||
repository-code: 'https://github.com/prefix-dev/pixi/releases/tag/v0.28.2' | ||
url: 'https://pixi.sh/v0.28.2' | ||
repository-code: 'https://github.com/prefix-dev/pixi/releases/tag/v0.29.0' | ||
url: 'https://pixi.sh/v0.29.0' | ||
abstract: >- | ||
A cross-platform, language agnostic, package/project | ||
management tool for development in virtual environments. | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
pub mod conda_environment_file; | ||
mod defaults; | ||
pub mod indicatif; | ||
mod prefix_guard; | ||
pub mod reqwest; | ||
|
||
pub use defaults::default_channel_config; | ||
pub use prefix_guard::{PrefixGuard, WriteGuard}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ We created [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) to | |
```yaml | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.28.2 | ||
pixi-version: v0.29.0 | ||
cache: true | ||
auth-host: prefix.dev | ||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
.pixi/ | ||
.pixi | ||
|
||
__pycache__/ | ||
dist/ | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
.pixi | ||
|
||
__pycache__/ | ||
dist/ | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
FROM ghcr.io/prefix-dev/pixi:0.18.0 AS build | ||
FROM ghcr.io/prefix-dev/pixi:0.28.2 AS install | ||
|
||
COPY . /app | ||
# Create a dummy blank project | ||
WORKDIR /app/docker_project | ||
RUN touch __init__.py | ||
|
||
# Install dependencies | ||
WORKDIR /app | ||
COPY pyproject.toml . | ||
COPY pixi.lock . | ||
RUN --mount=type=cache,target=/root/.cache/rattler/cache,sharing=private pixi install | ||
|
||
# Build for production | ||
FROM install AS build | ||
|
||
# Create an "entrypoint.sh" script which activates the pixi environment | ||
RUN printf '#!/bin/sh\n%s\nexec "$@"' "$(pixi shell-hook -e prod)" > /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
|
||
# Build then install the Python wheel | ||
COPY . . | ||
RUN pixi run build-wheel | ||
RUN pixi run postinstall-production | ||
RUN pixi shell-hook -e prod > /shell-hook | ||
RUN echo "gunicorn -w 4 docker_project:app --bind :8000" >> /shell-hook | ||
RUN pixi run install-wheel | ||
|
||
# Final minimal production image | ||
FROM ubuntu:22.04 AS production | ||
|
||
# only copy the production environment into prod container | ||
COPY --from=build /app/.pixi/envs/prod /app/.pixi/envs/prod | ||
COPY --from=build /shell-hook /shell-hook | ||
COPY --from=build /entrypoint.sh /entrypoint.sh | ||
WORKDIR /app | ||
EXPOSE 8000 | ||
CMD ["/bin/bash", "/shell-hook"] | ||
ENTRYPOINT ["/entrypoint.sh"] # uses the pixi environment | ||
CMD ["gunicorn", "docker_project:app", "-b", "0.0.0.0:8000"] |
Oops, something went wrong.