-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): update base image and install python dependencies
- Loading branch information
1 parent
bb3da6f
commit 3d17553
Showing
3 changed files
with
13 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
FROM rust:latest | ||
FROM python:3.10 | ||
|
||
USER root | ||
LABEL maintainer="HsiangNianian <[email protected]>" | ||
LABEL org.opencontainers.image.description "A simple iamai examples with python 3.10" | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y python3-full | ||
apt-get install -y curl && \ | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ | ||
export PATH="$HOME/.cargo/bin:$PATH" | ||
|
||
WORKDIR /app | ||
COPY . . | ||
|
||
RUN python3 -m venv /.venv | ||
RUN /.venv/bin/python -m pip install pdm maturin | ||
RUN /.venv/bin/python -m pip install --upgrade pip && \ | ||
/.venv/bin/python -m pip install pdm maturin | ||
RUN /.venv/bin/python -m pdm sync | ||
RUN /.venv/bin/python -m pdm install -dG dev | ||
|
||
CMD ["pdm", "run", "iamai", "version"] | ||
CMD ["/.venv/bin/python", "-m", "pdm", "run", "iamai", "version"] |
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,9 @@ | ||
FROM python:3.10 | ||
|
||
WORKDIR /app | ||
COPY . /examples | ||
|
||
RUN pip install iamai | ||
ADD /examples /app/ | ||
|
||
RUN pip install iamai[all] | ||
|
||
CMD ["pdm", "run", "main.py"] |
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