johann-foerster
commited on
Commit
·
82aaa1f
1
Parent(s):
7f48764
build-deploy
Browse files- Dockerfile +27 -0
- Jenkinsfile +22 -0
Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM nvidia/cuda:12.2.0-runtime-ubuntu22.04
|
2 |
+
|
3 |
+
RUN apt-get update && apt-get install -y \
|
4 |
+
wget \
|
5 |
+
supervisor \
|
6 |
+
&& rm -rf /var/lib/apt/lists/*
|
7 |
+
|
8 |
+
RUN useradd -ms /bin/bash app
|
9 |
+
ADD --chown=1000:1000 . /ai-christmas
|
10 |
+
USER app
|
11 |
+
WORKDIR ai-christmas
|
12 |
+
|
13 |
+
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
|
14 |
+
chmod +x Miniconda3-latest-Linux-x86_64.sh && \
|
15 |
+
./Miniconda3-latest-Linux-x86_64.sh -b && \
|
16 |
+
rm Miniconda3-latest-Linux-x86_64.sh
|
17 |
+
USER root
|
18 |
+
RUN ln -s /home/app/miniconda3/bin/conda /usr/bin/conda
|
19 |
+
USER app
|
20 |
+
|
21 |
+
RUN conda env create -f environment.yaml && \
|
22 |
+
conda run --no-capture-output -n fooocus pip install -r requirements_versions.txt
|
23 |
+
|
24 |
+
VOLUME /ai-christmas/models/checkpoints
|
25 |
+
VOLUME /ai-christmas/models/loras
|
26 |
+
EXPOSE 7860
|
27 |
+
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "fooocus", "python", "launch.py"]
|
Jenkinsfile
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
podTemplate(containers: [
|
2 |
+
containerTemplate(name: 'kaniko', image: 'gcr.io/kaniko-project/executor:v1.13.0-debug', command: 'cat', ttyEnabled: true,
|
3 |
+
resourceRequestCpu: '500m', resourceRequestMemory: '24Gi', resourceLimitMemory: '24Gi')
|
4 |
+
]) {
|
5 |
+
node(POD_LABEL) {
|
6 |
+
stage('checkout') {
|
7 |
+
checkout scm
|
8 |
+
}
|
9 |
+
|
10 |
+
stage('kaniko build+publish') {
|
11 |
+
container('kaniko'){
|
12 |
+
withCredentials([file(credentialsId: 'docker_auth', variable: 'dockerauth')]) {
|
13 |
+
sh "ln -s \$dockerauth /kaniko/.docker/config.json"
|
14 |
+
sh """/kaniko/executor --dockerfile `pwd`/Dockerfile \
|
15 |
+
--context `pwd` \
|
16 |
+
--destination docker.qualityminds.de/rd/ai-christmas:latest
|
17 |
+
"""
|
18 |
+
}
|
19 |
+
}
|
20 |
+
}
|
21 |
+
}
|
22 |
+
}
|