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
4911a6cb
Commit
4911a6cb
authored
Jan 11, 2025
by
Artem Baranovskyi
Browse files
Image build is optimized.
parent
df6dd85b
Pipeline
#10895
failed with stages
in 2 minutes and 12 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
4911a6cb
...
...
@@ -41,7 +41,8 @@ build:
-
docker system prune -a -f
-
docker volume prune -f
script
:
-
docker build --cache-from=asyst-nlp-grader --no-cache --progress=plain -t asyst-nlp-grader -f flask_ml_api/Dockerfile .
# - docker build --cache-from=asyst-nlp-grader --no-cache --progress=plain -t asyst-nlp-grader -f flask_ml_api/Dockerfile .
-
docker buildx build --cache-from=type=registry,ref=22baar1mst/asyst-nlp-grader --no-cache --progress=plain -t 22baar1mst/asyst-nlp-grader:latest -f flask_ml_api/Dockerfile --push .
-
docker push 22baar1mst/asyst-nlp-grader:latest
cache
:
key
:
build-cache
...
...
flask_ml_api/Dockerfile
View file @
4911a6cb
...
...
@@ -11,12 +11,10 @@ ENV PATH="/opt/myenv/bin:$PATH"
WORKDIR
/app
COPY
. /app
# Install dependencies in smaller steps
RUN
pip
install
--no-cache-dir
Flask matplotlib scikit-learn transformers pandas sentence_transformers
RUN
pip
install
--no-cache-dir
--upgrade
setuptools wheel
# Final image
FROM
python:3.10-slim
FROM
python:3.10-slim
AS
final
COPY
--from=builder /opt/myenv /opt/myenv
COPY
--from=builder /app /app
...
...
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