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
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
53b401f1
...
...
@@ -24,9 +24,10 @@ build:
-
docker:24-dind
before_script
:
-
export DOCKER_TMPDIR=/mnt/volume
-
docker system prune -a -f
-
df -h
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-test -f flask_ml_api/Dockerfile.test .
cache
:
key
:
build-cache
...
...
flask_ml_api/Dockerfile
View file @
53b401f1
...
...
@@ -13,17 +13,16 @@ ENV PATH="/opt/myenv/bin:$PATH"
WORKDIR
/app
COPY
. /app
#COPY ./asyst /app/asyst
# Install dependencies in separate steps to reduce memory usage
RUN
/opt/myenv/bin/pip
install
torch
RUN
/opt/myenv/bin/pip
install
Flask
RUN
/opt/myenv/bin/pip
install
matplotlib
RUN
/opt/myenv/bin/pip
install
scikit-learn
RUN
/opt/myenv/bin/pip
install
transformers
RUN
/opt/myenv/bin/pip
install
pandas
RUN
/opt/myenv/bin/pip
install
sentence_transformers
RUN
/opt/myenv/bin/python3
-m
pip
install
--upgrade
setuptools wheel
RUN
/opt/myenv/bin/pip
install
torch
\
&&
/opt/myenv/bin/pip
install
Flask
\
&&
/opt/myenv/bin/pip
install
matplotlib
\
&&
/opt/myenv/bin/pip
install
scikit-learn
\
&&
/opt/myenv/bin/pip
install
transformers
\
&&
/opt/myenv/bin/pip
install
pandas
\
&&
/opt/myenv/bin/pip
install
sentence_transformers
\
&&
/opt/myenv/bin/python3
-m
pip
install
--upgrade
setuptools wheel
# Final image
FROM
python:3.10-slim
...
...
@@ -47,4 +46,4 @@ RUN chown -R www-data:www-data /app/asyst \
EXPOSE
5000
# Run the application
CMD
["/opt/myenv/bin/python", "/app/api.py"]
\ No newline at end of file
CMD
["/opt/myenv/bin/python", "/app/api.py"]
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