Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KNIGHT
Asyst Moodle Plugin
Commits
cd283fa0
Commit
cd283fa0
authored
Jan 08, 2025
by
Artem Baranovskyi
Browse files
Image build is optimized.
parent
1484b0dc
Pipeline
#10758
failed with stages
in 1 minute and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
cd283fa0
...
@@ -31,9 +31,6 @@ before_script:
...
@@ -31,9 +31,6 @@ before_script:
-
docker network prune -f ||
true
-
docker network prune -f ||
true
-
docker image prune -a -f ||
true
-
docker image prune -a -f ||
true
-
docker builder prune -f ||
true
-
docker builder prune -f ||
true
-
apt-get clean
-
rm -rf /var/lib/apt/lists/*
-
rm -rf /root/.cache/pip
after_script
:
after_script
:
-
docker system prune -a -f --volumes ||
true
-
docker system prune -a -f --volumes ||
true
...
@@ -44,11 +41,13 @@ after_script:
...
@@ -44,11 +41,13 @@ after_script:
build
:
build
:
stage
:
build
stage
:
build
image
:
docker
:latest
image
:
ubuntu
:latest
services
:
services
:
-
name
:
docker:dind
-
name
:
docker:dind
command
:
[
"
--host=tcp://0.0.0.0:2375"
,
"
--tls=false"
,
"
--storage-driver=overlay2"
,
"
--mtu=1500"
,
"
--data-root=/mnt/volume"
]
command
:
[
"
--host=tcp://0.0.0.0:2375"
,
"
--tls=false"
,
"
--storage-driver=overlay2"
,
"
--mtu=1500"
,
"
--data-root=/mnt/volume"
]
script
:
script
:
-
apt-get update
-
apt-get install -y docker.io
-
docker buildx create --use
-
docker buildx create --use
-
docker build --cache-from=22baar1mst/asyst-nlp-grader --no-cache --progress=plain -t 22baar1mst/asyst-nlp-grader:latest -f flask_ml_api/Dockerfile .
-
docker build --cache-from=22baar1mst/asyst-nlp-grader --no-cache --progress=plain -t 22baar1mst/asyst-nlp-grader:latest -f flask_ml_api/Dockerfile .
-
docker push 22baar1mst/asyst-nlp-grader:latest
-
docker push 22baar1mst/asyst-nlp-grader:latest
...
@@ -57,11 +56,13 @@ build:
...
@@ -57,11 +56,13 @@ build:
deploy
:
deploy
:
stage
:
deploy
stage
:
deploy
image
:
docker
:latest
image
:
ubuntu
:latest
services
:
services
:
-
name
:
docker:dind
-
name
:
docker:dind
command
:
[
"
--tls=false"
,
"
--storage-driver=overlay2"
,
"
--mtu=1500"
,
"
--data-root=/mnt/volume"
]
command
:
[
"
--tls=false"
,
"
--storage-driver=overlay2"
,
"
--mtu=1500"
,
"
--data-root=/mnt/volume"
]
script
:
script
:
-
apt-get update
-
apt-get install -y docker.io
-
docker pull 22baar1mst/asyst-nlp-grader:latest
-
docker pull 22baar1mst/asyst-nlp-grader:latest
-
docker run -d 22baar1mst/asyst-nlp-grader:latest
-
docker run -d 22baar1mst/asyst-nlp-grader:latest
only
:
only
:
...
...
flask_ml_api/Dockerfile
View file @
cd283fa0
...
@@ -9,6 +9,9 @@ ENV PATH="$PATH:/root/.cargo/bin"
...
@@ -9,6 +9,9 @@ ENV PATH="$PATH:/root/.cargo/bin"
RUN
/root/.cargo/bin/rustup toolchain
install
stable
--profile
minimal
--no-self-update
RUN
/root/.cargo/bin/rustup toolchain
install
stable
--profile
minimal
--no-self-update
RUN
/root/.cargo/bin/rustup
--version
RUN
/root/.cargo/bin/cargo
--version
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
build-essential python3-venv
&&
\
build-essential python3-venv
&&
\
apt-get clean
&&
\
apt-get clean
&&
\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment