File size: 1,965 Bytes
2bb79e8
 
2077544
2bb79e8
 
 
 
 
 
 
 
 
 
 
 
 
29e2d22
9795529
 
29e2d22
 
 
2bb79e8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29e2d22
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
FROM python:3.12-slim

RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 wget  unzip gnupg curl libopenblas-dev
RUN curl -fsSL https://pgp.mongodb.com/server-8.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-8.0.gpg
RUN echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/8.0 main" | tee /etc/apt/sources.list.d/mongodb-org-8.0.list
RUN apt-get update && apt-get install -y --no-install-recommends mongodb-org


RUN mkdir -p /app/sd && \
    wget -q https://github.com/leejet/stable-diffusion.cpp/releases/download/master-564-fd35047/sd-master-fd35047-bin-Linux-Ubuntu-24.04-x86_64.zip -O /tmp/sd.zip && \
    unzip /tmp/sd.zip -d /app/sd && \
    chmod +x /app/sd/* && \
    rm /tmp/sd.zip

RUN ls -aR /app
RUN pip install --no-cache-dir uvicorn[standard] fastapi requests pymongo huggingface_hub python-multipart 
RUN mkdir -p /tmp/sd
RUN wget -nv -c \
https://huggingface.co/Diodaa/testsd/resolve/main/llama_cpp_python-0.3.23-py3-none-linux_x86_64.whl \
-P /tmp/sd/
RUN pip install /tmp/sd/llama_cpp_python-0.3.23-py3-none-linux_x86_64.whl
RUN rm -r /tmp/sd

ENV LD_LIBRARY_PATH=/app/sd:$LD_LIBRARY_PATH 
WORKDIR /app

COPY ./main.py /app/main.py
COPY ./cuur.html /app/cuur.html
COPY ./lorasdata.py /app/lorasdata.py
RUN mkdir -p /data/db &&  mkdir -p /var/log/mongodb

RUN wget -nv -c \
https://huggingface.co/leejet/Z-Image-Turbo-GGUF/resolve/main/z_image_turbo-Q4_0.gguf \
-P ./models/diffusion_models/

RUN wget -nv -c \
https://huggingface.co/unsloth/Qwen3-4B-Instruct-2507-GGUF/resolve/main/Qwen3-4B-Instruct-2507-Q4_0.gguf \
-P ./models/text_encoders/

RUN wget -nv -c \
https://huggingface.co/calcuis/pig-vae/resolve/main/pig_flux_vae_fp32-f16.gguf \
-P ./models/vae/
RUN ls -aR
EXPOSE 7860 27017
# CMD ["sh","mongod  --fork --logpath /var/log/mongodb/mongod.log  --bind_ip_all & uvicorn main:app --host 0.0.0.0 --port 7860"]
CMD python3 main.py