Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pado
Asyst Moodle Plugin
Commits
95aee7bb
Commit
95aee7bb
authored
4 months ago
by
Artem Baranovskyi
Browse files
Options
Download
Email Patches
Plain Diff
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
Showing
2 changed files
.gitlab-ci.yml
+1
-6
.gitlab-ci.yml
flask_ml_api/Dockerfile
+2
-11
flask_ml_api/Dockerfile
with
3 additions
and
17 deletions
+3
-17
.gitlab-ci.yml
+
1
-
6
View file @
95aee7bb
...
@@ -42,16 +42,12 @@ after_script:
...
@@ -42,16 +42,12 @@ after_script:
build
:
build
:
stage
:
build
stage
:
build
image
:
docker:latest
image
:
docker:latest
# image: docker:dind
services
:
services
:
-
name
:
docker:dind
-
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
:
script
:
-
docker buildx create --use
-
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 --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
-
docker push 22baar1mst/asyst-nlp-grader:latest
only
:
only
:
-
master
-
master
...
@@ -59,7 +55,6 @@ build:
...
@@ -59,7 +55,6 @@ build:
deploy
:
deploy
:
stage
:
deploy
stage
:
deploy
image
:
docker:latest
image
:
docker:latest
# image: docker:dind
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"
]
...
...
This diff is collapsed.
Click to expand it.
flask_ml_api/Dockerfile
+
2
-
11
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
FROM
pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime
as
build
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
...
@@ -14,19 +13,11 @@ COPY . /app
...
@@ -14,19 +13,11 @@ COPY . /app
RUN
pip
install
--no-cache-dir
Flask matplotlib scikit-learn transformers pandas sentence_transformers
&&
\
RUN
pip
install
--no-cache-dir
Flask matplotlib scikit-learn transformers pandas sentence_transformers
&&
\
pip
install
--no-cache-dir
--upgrade
setuptools wheel
&&
\
pip
install
--no-cache-dir
--upgrade
setuptools wheel
&&
\
rm
-rf
/root/.cache/pip
\
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
FROM
pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime
FROM
pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime
COPY
--from=build /opt/myenv /opt/myenv
COPY
--from=build /opt/myenv /opt/myenv
ENV
PATH="/opt/myenv/bin:$PATH"
ENV
PATH="/opt/myenv/bin:$PATH"
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets