-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: migrate from python:3.10 to ubuntu:22.04 image. (#55)
- Loading branch information
Showing
2 changed files
with
17 additions
and
10 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,36 +1,43 @@ | ||
FROM python:3.10 | ||
FROM ubuntu:22.04 | ||
|
||
LABEL version='{{ version }}' | ||
LABEL org.opencontainers.image.description='{{ readme }}' | ||
LABEL org.opencontainers.image.vendor='{{ author }}' | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
WORKDIR /toolchain | ||
|
||
# Normal update | ||
RUN apt-get update -y | ||
|
||
# Install nodejs | ||
RUN curl -sL https://deb.nodesource.com/setup_16.x | sed --expression='s/sleep 60//g' | bash - | ||
RUN apt-get -y install nodejs npm | ||
RUN apt-get -y install curl git pip | ||
|
||
# Install proper nodejs version. | ||
ENV NVM_DIR=/toolchain | ||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh > install.sh | ||
RUN echo "69da4f89f430cd5d6e591c2ccfa2e9e3ad55564ba60f651f00da85e04010c640 install.sh" > checksum.txt | ||
RUN sha256sum -c checksum.txt | ||
RUN bash ./install.sh | ||
RUN source "$NVM_DIR/nvm.sh" && nvm install v16.20.0 && nvm use v16.20.0 | ||
|
||
# Install XPM | ||
RUN npm install --global xpm@latest | ||
RUN source "$NVM_DIR/nvm.sh" && npm install --global xpm@0.16.4 | ||
|
||
# Install gcc extensions | ||
RUN xpm install --global @xpack-dev-tools/riscv-none-elf-gcc@latest --verbose | ||
# Install gcc toolchain | ||
RUN source "$NVM_DIR/nvm.sh" && xpm install --global @xpack-dev-tools/riscv-none-elf-gcc@13.2.0-1.2 --verbose | ||
ENV PATH="/root/.local/xPacks/@xpack-dev-tools/riscv-none-elf-gcc/13.2.0-1.2/.content/bin:$PATH" | ||
|
||
# Install Poetry | ||
|
||
RUN pip3 install --upgrade pip | ||
RUN pip3 install poetry | ||
|
||
# Install Poetry dependencies | ||
ADD pyproject.toml . | ||
ADD poetry.lock . | ||
|
||
RUN poetry install --no-interaction | ||
|
||
ADD mtkcpu ./mtkcpu | ||
RUN poetry install --no-interaction | ||
|
||
ENV PATH=$HOME/.poetry/bin/:$PATH | ||
ENTRYPOINT ["poetry", "run", "mtkcpu"] |
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