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
1cd8db47
Commit
1cd8db47
authored
Dec 16, 2024
by
Artem Baranovskyi
Browse files
Image build is optimized.
parent
0dda9f3c
Changes
1
Show whitespace changes
Inline
Side-by-side
flask_ml_api/Dockerfile
View file @
1cd8db47
...
@@ -14,13 +14,17 @@ ENV PATH="/opt/myenv/bin:$PATH"
...
@@ -14,13 +14,17 @@ ENV PATH="/opt/myenv/bin:$PATH"
WORKDIR
/app
WORKDIR
/app
COPY
. /app
COPY
. /app
COPY
./asyst /app/asyst
COPY
./asyst /app/asyst
COPY
requirements.txt .
# Install dependencies
# Install dependencies in separate steps to reduce memory usage
RUN
/opt/myenv/bin/pip
install
-r
/app/requirements.txt
\
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
&&
/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