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
53b401f1
Commit
53b401f1
authored
Dec 31, 2024
by
Artem Baranovskyi
Browse files
Image build is optimized.
parent
2dc841d4
Pipeline
#10600
failed with stage
in 4 minutes and 51 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
53b401f1
...
@@ -24,9 +24,10 @@ build:
...
@@ -24,9 +24,10 @@ build:
-
docker:24-dind
-
docker:24-dind
before_script
:
before_script
:
-
export DOCKER_TMPDIR=/mnt/volume
-
export DOCKER_TMPDIR=/mnt/volume
-
docker system prune -a -f
-
df -h
script
:
script
:
-
docker build --no-cache --pull --progress=plain -t flask-backend-full -f flask_ml_api/Dockerfile .
-
docker build --no-cache --pull --progress=plain -t flask-backend-full -f flask_ml_api/Dockerfile .
# - docker build --no-cache --pull --progress=plain -t flask-backend-test -f flask_ml_api/Dockerfile.test .
cache
:
cache
:
key
:
build-cache
key
:
build-cache
...
...
flask_ml_api/Dockerfile
View file @
53b401f1
...
@@ -13,17 +13,16 @@ ENV PATH="/opt/myenv/bin:$PATH"
...
@@ -13,17 +13,16 @@ ENV PATH="/opt/myenv/bin:$PATH"
WORKDIR
/app
WORKDIR
/app
COPY
. /app
COPY
. /app
#COPY ./asyst /app/asyst
# Install dependencies in separate steps to reduce memory usage
# Install dependencies in separate steps to reduce memory usage
RUN
/opt/myenv/bin/pip
install
torch
RUN
/opt/myenv/bin/pip
install
torch
\
RUN
/opt/myenv/bin/pip
install
Flask
&&
/opt/myenv/bin/pip
install
Flask
\
RUN
/opt/myenv/bin/pip
install
matplotlib
&&
/opt/myenv/bin/pip
install
matplotlib
\
RUN
/opt/myenv/bin/pip
install
scikit-learn
&&
/opt/myenv/bin/pip
install
scikit-learn
\
RUN
/opt/myenv/bin/pip
install
transformers
&&
/opt/myenv/bin/pip
install
transformers
\
RUN
/opt/myenv/bin/pip
install
pandas
&&
/opt/myenv/bin/pip
install
pandas
\
RUN
/opt/myenv/bin/pip
install
sentence_transformers
&&
/opt/myenv/bin/pip
install
sentence_transformers
\
RUN
/opt/myenv/bin/python3
-m
pip
install
--upgrade
setuptools wheel
&&
/opt/myenv/bin/python3
-m
pip
install
--upgrade
setuptools wheel
# Final image
# Final image
FROM
python:3.10-slim
FROM
python:3.10-slim
...
...
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