Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Software Heritage virtual environment packaging manifests
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Infrastructure
Software Heritage virtual environment packaging manifests
Commits
de0e559d
Unverified
Commit
de0e559d
authored
1 month ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
scripts: Build the app-manager image build faster
parent
70557a7f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/Dockerfile
+21
-16
21 additions, 16 deletions
scripts/Dockerfile
scripts/requirements.txt
+1
-1
1 addition, 1 deletion
scripts/requirements.txt
with
22 additions
and
17 deletions
scripts/Dockerfile
+
21
−
16
View file @
de0e559d
# build-deps container to call scripts/generate-frozen-requirements.txt on an
# application (e.g. swh-loader-svn, swh-loader-git, ...)
FROM
python:3.10-bullseye
# build-deps container to call various app_manager's subcommand on an swh application
# (e.g. generate-frozen-requirements, list-application, ...)
FROM
python:3.11-bookworm
ARG
userid=1000
ARG
groupid=1000
RUN
addgroup
--gid
$groupid
swh
&&
\
useradd
--gid
$groupid
--uid
$userid
-m
-d
/opt/swh swh
ARG
user=swh
ARG
workdir=/opt/${user}
ARG
venv=${workdir}/venv
# First install the runtime deps of all swh applications
RUN
apt-get
-y
update
&&
\
...
...
@@ -23,20 +24,24 @@ RUN apt-get -y update && \
# swh lister's dependency on rpy2 need this
r-base-dev \
&& \
apt clean
apt clean && \
addgroup --gid ${groupid} ${user} && \
useradd --gid ${groupid} --uid ${userid} -m -d ${workdir} ${user}
RUN
mkdir
-p
/opt/scripts/
COPY
app_manager.py /opt/scripts/
COPY
requirements.txt /opt/scripts/
RUN
chmod
+x /opt/scripts/app_manager.py
USER
${user}
RUN
python
-m
venv
${
venv
}
WORKDIR
${workdir}
USER
swh
WORKDIR
/opt/swh
ENV
PYTHONPATH=${venv}
ENV
PATH=${venv}/bin:$PATH
RUN
pip
install
-U
pip setuptools wheel
&&
\
pip
install
-r
/opt/scripts/requirements.txt
RUN
python
-m
pip
install
uv
COPY
--chown=${userid}:${groupid} requirements.txt ${workdir}
RUN
uv pip
sync
--no-cache
requirements.txt
# This expects the /src/ to be mounted on swh-apps repository folder at runtime
ENV
SWH_APPS_DIR=/src/apps
ENTRYPOINT
[ "/opt/scripts/app_manager.py" ]
COPY
--chown=${userid}:${groupid} app_manager.py ${workdir}
RUN
chmod
u+x
${
workdir
}
/app_manager.py
ENTRYPOINT
[ "/opt/swh/app_manager.py" ]
This diff is collapsed.
Click to expand it.
scripts/requirements.txt
+
1
−
1
View file @
de0e559d
click
dulwich
PyYAML
pyyaml
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment