-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
executable file
·64 lines (58 loc) · 1.66 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# syntax=docker/dockerfile:1
FROM ghcr.io/imagegenius/baseimage-ubuntu:jammy
# set version label
ARG BUILD_DATE
ARG VERSION
ARG IMMICH_VERSION
LABEL build_version="ImageGenius Version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="hydazz, martabal"
RUN \
echo "**** install runtime packages ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
g++ \
libcublas11 \
libcublaslt11 \
libcudart11.0 \
libcufft10 \
libcurand10 \
python3-dev \
python3-venv && \
curl -o \
/tmp/libcudnn.deb -L \
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/libcudnn8_8.5.0.96-1+cuda11.7_amd64.deb && \
dpkg -i /tmp/libcudnn.deb && \
echo "**** download immich ****" && \
mkdir -p \
/tmp/immich && \
if [ -z ${IMMICH_VERSION} ]; then \
IMMICH_VERSION=$(curl -sL https://api.github.com/repos/immich-app/immich/releases/latest | \
jq -r '.tag_name'); \
fi && \
curl -o \
/tmp/immich.tar.gz -L \
"https://github.com/immich-app/immich/archive/${IMMICH_VERSION}.tar.gz" && \
tar xf \
/tmp/immich.tar.gz -C \
/tmp/immich --strip-components=1 && \
echo "**** install machine-learning ****" && \
cd /tmp/immich/machine-learning && \
mkdir -p \
/app/immich/machine-learning && \
cp -a \
app \
/app/immich/machine-learning && \
echo "**** cleanup ****" && \
apt-get autoremove -y --purge && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/tmp/* \
/var/lib/apt/lists/*
# copy local files
COPY root/ /
# environment settings
ENV MACHINE_LEARNING_CACHE_FOLDER="/config/machine-learning"
# ports and volumes
EXPOSE 3003
VOLUME /config