Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Librephotos Docker Scaling
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Dev Ops
Librephotos Docker Scaling
Commits
d3067a34
Unverified
Commit
d3067a34
authored
2 years ago
by
Niaz Faridani-Rad
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #75 from JcMinarro/reduce-docker-layers-size
Reduce docker layer size
parents
69b11e48
44c976d6
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
backend/base/Dockerfile
+9
-4
9 additions, 4 deletions
backend/base/Dockerfile
backend/dependencies/Dockerfile
+2
-4
2 additions, 4 deletions
backend/dependencies/Dockerfile
with
11 additions
and
8 deletions
backend/base/Dockerfile
+
9
−
4
View file @
d3067a34
...
...
@@ -7,7 +7,9 @@ RUN apt-get update \
&&
apt-get
install
-y
python3-pip python3-dev
\
&&
cd
/usr/local/bin
\
&&
ln
-s
/usr/bin/python3 python
\
&&
pip3
install
--upgrade
pip
&&
pip3
install
--upgrade
pip
\
&&
apt-get clean
\
&&
rm
-rf
/var/lib/apt/lists/
*
# system packages installation
RUN
apt-get update
&&
\
...
...
@@ -66,7 +68,8 @@ RUN git clone https://github.com/LibRaw/LibRaw && \
autoreconf --install && \
./configure && \
make && \
make install
make install && \
rm -rf /tmp/builds/*
#Build and install imagemagick
WORKDIR
/tmp/builds
...
...
@@ -75,7 +78,8 @@ RUN curl -SL https://imagemagick.org/archive/releases/ImageMagick-${IMAGEMAGICK_
cd
ImageMagick-
${
IMAGEMAGICK_VERSION
}
&&
\
./configure
--with-modules
&&
\
make
install
&&
\
ldconfig /usr/local/lib
ldconfig /usr/local/lib
&&
\
rm
-rf
/tmp/builds/
*
# Build and install libvips
WORKDIR
/tmp/builds
...
...
@@ -85,4 +89,5 @@ RUN curl -SL https://github.com/libvips/libvips/releases/download/v${VIPSVERSION
&& ./configure \
&& make V=0 \
&& make install \
&& ldconfig
&& ldconfig \
&& rm -rf /tmp/builds/*
This diff is collapsed.
Click to expand it.
backend/dependencies/Dockerfile
+
2
−
4
View file @
d3067a34
...
...
@@ -9,7 +9,8 @@ RUN git clone --depth 1 --branch 'v19.24' https://github.com/davisking/dlib.git
cmake ..
-DDLIB_USE_CUDA
=
0
-DUSE_AVX_INSTRUCTIONS
=
0
-DLIB_NO_GUI_SUPPORT
=
0
&&
\
cmake
--build
.
&&
\
cd
/tmp/builds/dlib
&&
\
python3 setup.py
install
--no
USE_AVX_INSTRUCTIONS
--no
DLIB_USE_CUDA
--no
USE_SSE4_INSTRUCTIONS
python3 setup.py
install
--no
USE_AVX_INSTRUCTIONS
--no
DLIB_USE_CUDA
--no
USE_SSE4_INSTRUCTIONS
&&
\
rm
-rf
/tmp/builds/
*
# Download pretrained models
WORKDIR
/data_models
...
...
@@ -18,6 +19,3 @@ RUN mkdir -p /root/.cache/torch/hub/checkpoints/ && \
curl
-SL
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/im2txt.tar.gz |
tar
-zxC
/data_models/
&&
\
curl
-SL
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/clip-embeddings.tar.gz |
tar
-zxC
/data_models/
&&
\
curl
-SL
https://download.pytorch.org/models/resnet152-b121ed2d.pth
-o
/root/.cache/torch/hub/checkpoints/resnet152-b121ed2d.pth
# Remove build directory
RUN
rm
-fr
/tmp/
*
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