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
ade648ae
Commit
ade648ae
authored
Jan 06, 2025
by
Artem Baranovskyi
Browse files
Image build is optimized.
parent
5cb4819f
Pipeline
#10734
failed with stages
in 10 minutes
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
ade648ae
...
@@ -42,8 +42,8 @@ build:
...
@@ -42,8 +42,8 @@ build:
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=flask-backend-full --no-cache --progress=plain -t flask-backend-full -f flask_ml_api/Dockerfile .
-
docker build --cache-from=
flask-backend-full
--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 .
#
- docker build --no-cache --progress=plain -t 22baar1mst/asyst-nlp-grader:latest -f flask_ml_api/Dockerfile .
-
echo $DOCKER_REPO
-
echo $DOCKER_REPO
-
docker push 22baar1mst/asyst-nlp-grader:latest
-
docker push 22baar1mst/asyst-nlp-grader:latest
only
:
only
:
...
...
flask_ml_api/Dockerfile
View file @
ade648ae
FROM
pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
FROM
pytorch/pytorch:2.0.1-cuda11.7-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
\
build-essential python3-venv
&&
\
build-essential python3-venv
&&
\
...
@@ -8,13 +8,26 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
...
@@ -8,13 +8,26 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN
python3
-m
venv /opt/myenv
RUN
python3
-m
venv /opt/myenv
ENV
PATH="/opt/myenv/bin:$PATH"
ENV
PATH="/opt/myenv/bin:$PATH"
#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
FROM
pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
COPY
--from=build /opt/myenv /opt/myenv
ENV
PATH="/opt/myenv/bin:$PATH"
WORKDIR
/app
WORKDIR
/app
COPY
. /app
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
chown
-R
www-data:www-data /app
&&
chmod
-R
755 /app
RUN
chown
-R
www-data:www-data /app
&&
chmod
-R
755 /app
EXPOSE
5000
EXPOSE
5000
...
...
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