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
46ec4a51
Unverified
Commit
46ec4a51
authored
3 years ago
by
Niaz
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #19 from LibrePhotos/uiredesign
Ui Redesign
parents
a65a9eef
e4516957
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
backend/Dockerfile
+53
-2
53 additions, 2 deletions
backend/Dockerfile
backend/entrypoint.sh
+1
-1
1 addition, 1 deletion
backend/entrypoint.sh
frontend/Dockerfile
+1
-1
1 addition, 1 deletion
frontend/Dockerfile
frontend/entrypoint.sh
+1
-1
1 addition, 1 deletion
frontend/entrypoint.sh
with
56 additions
and
5 deletions
backend/Dockerfile
+
53
−
2
View file @
46ec4a51
FROM
python:3.8-slim-buster
FROM
python:3.8-slim-buster
# system packages installation
# system packages installation
RUN
apt update
&&
apt
install
-y
ffmpeg libimage-exiftool-perl curl nfs-common cifs-utils libopenblas-dev libmagickwand-dev libheif-dev libmagic1 ufraw-batch libboost-all-dev libxrender-dev liblapack-dev git bzip2 cmake build-essential libsm6 libglib2.0-0 libgl1-mesa-glx libpq-dev
--no-install-recommends
RUN
apt update
&&
apt
install
-y
ffmpeg libimage-exiftool-perl curl nfs-common cifs-utils libopenblas-dev libheif-dev libmagic1 libraw-dev libboost-all-dev libxrender-dev liblapack-dev git bzip2 cmake build-essential libsm6 libglib2.0-dev libgl1-mesa-glx libpq-dev libexpat-dev
\
librsvg2-dev
\
libpng-dev
\
libgif-dev
\
libjpeg-dev
\
libexif-dev
\
liblcms2-dev
\
liborc-dev
\
pkg-config
\
libexpat1-dev \
libtiff5-dev \
libgsf-1-dev \
libopenexr-dev \
libcfitsio-dev \
libimagequant-dev \
libtool \
libtool-bin \
wget \
libwebp-dev --no-install-recommends
#Build and install libraw
RUN
git clone https://github.com/LibRaw/LibRaw
RUN
ls
WORKDIR
/LibRaw
RUN
autoreconf
--install
RUN
./configure
RUN
make
RUN
make
install
#Build and install imagemagick
WORKDIR
/
RUN
mkdir
/imagemagick
RUN
curl
-SL
https://www.imagemagick.org/download/ImageMagick.tar.gz |
tar
-zxC
/imagemagick
WORKDIR
/imagemagick/ImageMagick-7.1.0-4
RUN
./configure
--with-modules
RUN
make
install
RUN
ldconfig /usr/local/lib
# Build and install libvips
ARG
VIPSVERSION=8.11.0
ARG
VIPSURL=https://github.com/libvips/libvips/releases/download
WORKDIR
/usr/local/src
RUN
wget
${
VIPSURL
}
/v
${
VIPSVERSION
}
/vips-
${
VIPSVERSION
}
.tar.gz
\
&& tar xzf vips-${VIPSVERSION}.tar.gz \
&& cd vips-${VIPSVERSION} \
&& ./configure \
&& make V=0 \
&& make install \
&& ldconfig
# pre trained models download
# pre trained models download
WORKDIR
/data_models
WORKDIR
/data_models
RUN
mkdir
-p
/root/.cache/torch/hub/checkpoints/
RUN
mkdir
-p
/root/.cache/torch/hub/checkpoints/
RUN
curl
-SL
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/places365.tar.gz |
tar
-zxC
/data_models/
RUN
curl
-SL
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/places365.tar.gz |
tar
-zxC
/data_models/
RUN
curl
-SL
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/im2txt.tar.gz |
tar
-zxC
/data_models/
RUN
curl
-SL
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/im2txt.tar.gz |
tar
-zxC
/data_models/
RUN
curl
-SL
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/clip-embeddings.tar.gz |
tar
-zxC
/data_models/
RUN
curl
-SL
https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/clip-embeddings.tar.gz |
tar
-zxC
/data_models/
RUN
curl
-SL
https://download.pytorch.org/models/resnet152-b121ed2d.pth
-o
/root/.cache/torch/hub/checkpoints/resnet152-b121ed2d.pth
RUN
curl
-SL
https://download.pytorch.org/models/resnet152-b121ed2d.pth
-o
/root/.cache/torch/hub/checkpoints/resnet152-b121ed2d.pth
RUN
pip
install
torch
==
1.8.0+cpu
torchvision
==
0.9.0+cpu
-f
https://download.pytorch.org/whl/torch_stable.html
RUN
pip
install
torch
==
1.8.0+cpu
torchvision
==
0.9.0+cpu
-f
https://download.pytorch.org/whl/torch_stable.html
RUN
pip3
install
pyvips
# Build and install dlib
# Build and install dlib
WORKDIR
/
WORKDIR
/
RUN
git clone https://github.com/davisking/dlib.git
&&
\
RUN
git clone https://github.com/davisking/dlib.git
&&
\
...
...
This diff is collapsed.
Click to expand it.
backend/entrypoint.sh
+
1
−
1
View file @
46ec4a51
...
@@ -16,7 +16,7 @@ python manage.py rqworker default 2>&1 | tee /logs/rqworker.log &
...
@@ -16,7 +16,7 @@ python manage.py rqworker default 2>&1 | tee /logs/rqworker.log &
if
[
"
$DEBUG
"
=
1
]
if
[
"
$DEBUG
"
=
1
]
then
then
echo
"develo
m
pent backend starting"
echo
"develop
m
ent backend starting"
gunicorn
--worker-class
=
gevent
--timeout
36000
--reload
--bind
0.0.0.0:8001
--log-level
=
info ownphotos.wsgi 2>&1 |
tee
/logs/gunicorn_django.log
gunicorn
--worker-class
=
gevent
--timeout
36000
--reload
--bind
0.0.0.0:8001
--log-level
=
info ownphotos.wsgi 2>&1 |
tee
/logs/gunicorn_django.log
else
else
echo
"production backend starting"
echo
"production backend starting"
...
...
This diff is collapsed.
Click to expand it.
frontend/Dockerfile
+
1
−
1
View file @
46ec4a51
...
@@ -7,7 +7,7 @@ WORKDIR /usr/src/app
...
@@ -7,7 +7,7 @@ WORKDIR /usr/src/app
RUN
npm
install
-g
serve
RUN
npm
install
-g
serve
ENV
CLI_WIDTH 80
ENV
CLI_WIDTH 80
RUN
git clone https://github.com/LibrePhotos/librephotos-frontend /usr/src/app
RUN
git clone https://github.com/LibrePhotos/librephotos-frontend /usr/src/app
RUN
npm
install
RUN
npm
install
--legacy-peer-deps
RUN
npm run build
RUN
npm run build
EXPOSE
3000
EXPOSE
3000
...
...
This diff is collapsed.
Click to expand it.
frontend/entrypoint.sh
+
1
−
1
View file @
46ec4a51
#!/usr/bin/env bash
#!/usr/bin/env bash
echo
"installing frontend"
echo
"installing frontend"
npm
install
npm
install
--legacy-peer-deps
echo
"serving frontend"
echo
"serving frontend"
if
[
"
$DEBUG
"
=
1
]
if
[
"
$DEBUG
"
=
1
]
...
...
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