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
95aee7bb
Commit
95aee7bb
authored
Jan 06, 2025
by
Artem Baranovskyi
Browse files
Image build is optimized.
parent
aee745d1
Pipeline
#10740
failed with stages
in 4 minutes and 3 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
95aee7bb
...
...
@@ -42,16 +42,12 @@ after_script:
build
:
stage
:
build
image
:
docker:latest
# image: docker:dind
services
:
-
name
:
docker:dind
command
:
[
"
--host=
fd://
"
,
"
--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
:
-
docker buildx create --use
# - docker build --cache-from=flask-backend-full --no-cache --progress=plain -t flask-backend-full -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 build --no-cache --progress=plain -t 22baar1mst/asyst-nlp-grader:latest -f flask_ml_api/Dockerfile .
-
echo $DOCKER_REPO
-
docker push 22baar1mst/asyst-nlp-grader:latest
only
:
-
master
...
...
@@ -59,7 +55,6 @@ build:
deploy
:
stage
:
deploy
image
:
docker:latest
# image: docker:dind
services
:
-
name
:
docker:dind
command
:
[
"
--tls=false"
,
"
--storage-driver=overlay2"
,
"
--mtu=1500"
,
"
--data-root=/mnt/volume"
]
...
...
flask_ml_api/Dockerfile
View file @
95aee7bb
#FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime as build
FROM
pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime
as
build
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
...
...
@@ -14,19 +13,11 @@ COPY . /app
RUN
pip
install
--no-cache-dir
Flask matplotlib scikit-learn transformers pandas sentence_transformers
&&
\
pip
install
--no-cache-dir
--upgrade
setuptools wheel
&&
\
rm
-rf
/root/.cache/pip
\
#RUN pip install --no-cache-dir Flask && \
# pip install --no-cache-dir matplotlib && \
# pip install --no-cache-dir scikit-learn && \
# pip install --no-cache-dir transformers && \
# pip install --no-cache-dir pandas && \
# pip install --no-cache-dir sentence_transformers && \
# pip install --no-cache-dir --upgrade setuptools wheel
#RUN rm -rf /root/.cache/pip
rm
-rf
/root/.cache/pip
FROM
pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime
COPY
--from=build /opt/myenv /opt/myenv
ENV
PATH="/opt/myenv/bin:$PATH"
...
...
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