-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (42 loc) · 1.79 KB
/
Copy pathDockerfile
File metadata and controls
51 lines (42 loc) · 1.79 KB
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
FROM nvidia/cuda:12.2.2-cudnn8-devel-ubuntu22.04
COPY requirements.txt /
ENV DEBIAN_FRONTEND=noninteractive
RUN \
apt-get update -y && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt-get update -y && \
apt-get install -y --no-install-recommends \
python3.11 python3.11-venv python3.11-dev python3-pip \
build-essential cmake ninja-build vim git curl pciutils && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
# Download and install FRP client into /usr/local/bin.
RUN set -ex; \
ARCH=$(uname -m); \
if [ "$ARCH" = "aarch64" ]; then \
FRP_URL="https://raw.githubusercontent.com/nextcloud/HaRP/main/exapps_dev/frp_0.61.1_linux_arm64.tar.gz"; \
else \
FRP_URL="https://raw.githubusercontent.com/nextcloud/HaRP/main/exapps_dev/frp_0.61.1_linux_amd64.tar.gz"; \
fi; \
echo "Downloading FRP client from $FRP_URL"; \
curl -L "$FRP_URL" -o /tmp/frp.tar.gz; \
tar -C /tmp -xzf /tmp/frp.tar.gz; \
mv /tmp/frp_0.61.1_linux_* /tmp/frp; \
cp /tmp/frp/frpc /usr/local/bin/frpc; \
chmod +x /usr/local/bin/frpc; \
rm -rf /tmp/frp /tmp/frp.tar.gz
# Build stable-diffusion.cpp with CUDA when installing requirements
RUN \
CMAKE_ARGS="-DSD_CUDA=ON" python3 -m pip install --no-cache-dir -r requirements.txt && \
rm -rf ~/.cache && rm requirements.txt
ADD /ex_app/cs[s] /ex_app/css
ADD /ex_app/im[g] /ex_app/img
ADD /ex_app/j[s] /ex_app/js
ADD /ex_app/l10[n] /ex_app/l10n
ADD /ex_app/li[b] /ex_app/lib
COPY --chmod=775 healthcheck.sh /
COPY --chmod=775 start.sh /
WORKDIR /ex_app/lib
ENTRYPOINT ["/start.sh"]
LABEL org.opencontainers.image.source=https://github.com/nextcloud/text2image_flux
HEALTHCHECK --interval=2s --timeout=2s --retries=300 CMD /healthcheck.sh