mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Update dockerfile
- Bazel no longer required - Python no longer required - Add back the import check step that got lost at one point
This commit is contained in:
parent
5e0a761b87
commit
1aae621549
4 changed files with 8 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM python:3.9-slim-buster
|
FROM debian:10-slim
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
|
@ -48,16 +48,12 @@ RUN apt-get update && apt install --yes gnupg ca-certificates && \
|
||||||
zstd \
|
zstd \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.7.4/bazelisk-linux-amd64 \
|
|
||||||
-o /usr/local/bin/bazel \
|
|
||||||
&& chmod +x /usr/local/bin/bazel
|
|
||||||
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
|
||||||
|
|
||||||
RUN mkdir -p /etc/buildkite-agent/hooks && chown -R user /etc/buildkite-agent
|
RUN mkdir -p /etc/buildkite-agent/hooks && chown -R user /etc/buildkite-agent
|
||||||
|
|
||||||
COPY buildkite.cfg /etc/buildkite-agent/buildkite-agent.cfg
|
COPY buildkite.cfg /etc/buildkite-agent/buildkite-agent.cfg
|
||||||
COPY environment /etc/buildkite-agent/hooks/environment
|
COPY environment /etc/buildkite-agent/hooks/environment
|
||||||
|
|
||||||
|
# Available in Debian 11 as ninja-build, but we're building with Debian 10
|
||||||
RUN curl -LO https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip \
|
RUN curl -LO https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-linux.zip \
|
||||||
&& unzip ninja-linux.zip \
|
&& unzip ninja-linux.zip \
|
||||||
&& chmod +x ninja \
|
&& chmod +x ninja \
|
||||||
|
|
|
@ -53,12 +53,6 @@ RUN apt-get update && apt install --yes gnupg ca-certificates && \
|
||||||
# -- end only required for arm64/debian11
|
# -- end only required for arm64/debian11
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.10.1/bazelisk-linux-arm64 \
|
|
||||||
-o /usr/local/bin/bazel \
|
|
||||||
&& chmod +x /usr/local/bin/bazel
|
|
||||||
|
|
||||||
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
|
||||||
|
|
||||||
RUN mkdir -p /etc/buildkite-agent/hooks && chown -R user /etc/buildkite-agent
|
RUN mkdir -p /etc/buildkite-agent/hooks && chown -R user /etc/buildkite-agent
|
||||||
|
|
||||||
COPY buildkite.cfg /etc/buildkite-agent/buildkite-agent.cfg
|
COPY buildkite.cfg /etc/buildkite-agent/buildkite-agent.cfg
|
||||||
|
|
|
@ -14,3 +14,6 @@ export BUILD_ROOT=/state/build
|
||||||
export ONLINE_TESTS=1
|
export ONLINE_TESTS=1
|
||||||
|
|
||||||
./ninja pylib/anki qt/aqt check
|
./ninja pylib/anki qt/aqt check
|
||||||
|
|
||||||
|
# ensure anki/aqt importable
|
||||||
|
SKIP_RUN=1 ./run
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
# Copyright: Ankitects Pty Ltd and contributors
|
# Copyright: Ankitects Pty Ltd and contributors
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.extend(["pylib", "qt", "out/pylib", "out/qt"])
|
sys.path.extend(["pylib", "qt", "out/pylib", "out/qt"])
|
||||||
|
|
||||||
import aqt
|
import aqt
|
||||||
|
|
||||||
aqt.run()
|
if not os.environ.get("SKIP_RUN"):
|
||||||
|
aqt.run()
|
||||||
|
|
Loading…
Reference in a new issue