Project 'ulrike.pado/asyst-moodle-plugin' was moved to 'knight/asyst-moodle-plugin'. Please update any links and bookmarks that may still have the old path.
Commit 4911a6cb authored by Artem Baranovskyi's avatar Artem Baranovskyi
Browse files

Image build is optimized.

parent df6dd85b
No related merge requests found
Pipeline #10895 failed with stages
in 2 minutes and 12 seconds
Showing with 3 additions and 4 deletions
+3 -4
...@@ -41,7 +41,8 @@ build: ...@@ -41,7 +41,8 @@ build:
- docker system prune -a -f - docker system prune -a -f
- docker volume prune -f - docker volume prune -f
script: 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 - docker push 22baar1mst/asyst-nlp-grader:latest
cache: cache:
key: build-cache key: build-cache
......
...@@ -11,12 +11,10 @@ ENV PATH="/opt/myenv/bin:$PATH" ...@@ -11,12 +11,10 @@ ENV PATH="/opt/myenv/bin:$PATH"
WORKDIR /app WORKDIR /app
COPY . /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 Flask matplotlib scikit-learn transformers pandas sentence_transformers
RUN pip install --no-cache-dir --upgrade setuptools wheel RUN pip install --no-cache-dir --upgrade setuptools wheel
# Final image FROM python:3.10-slim AS final
FROM python:3.10-slim
COPY --from=builder /opt/myenv /opt/myenv COPY --from=builder /opt/myenv /opt/myenv
COPY --from=builder /app /app COPY --from=builder /app /app
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment