Skip to content

Commit

Permalink
Add lfs to Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
acmo0 committed May 28, 2024
1 parent 571c8ec commit 7e988a6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM python:3.10
FROM python:3.10-alpine
WORKDIR /app

COPY requirements_api.txt .
COPY requirements_ai.txt .

RUN apk update && apk add git wget cargo
RUN pip3 install --upgrade pip
RUN pip install --no-cache-dir --no-deps -r requirements_ai.txt
RUN pip install --no-cache-dir -r requirements_api.txt
Expand All @@ -12,6 +13,20 @@ COPY . .

RUN wget -q -O app/models/models_weight/ld-model.ckpt https://ommer-lab.com/files/latent-diffusion/nitro/txt2img-f8-large/model.ckpt

RUN mkdir repos
WORKDIR repos

RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
RUN apk install git-lfs
RUN git lfs install
RUN git clone https://github.com/Dilydigre/ai.git

WORKDIR ../

RUN cp repos/ai/app/models/models_weight/modele1.ckpt app/models/models_weight/modele1.ckpt
RUN rm -rf repos


EXPOSE 5000

CMD ["uvicorn", "app.main:app", "--host","0.0.0.0", "--port", "5000"]
2 changes: 1 addition & 1 deletion requirements_ai.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ multidict==6.0.5
namex==0.0.8
networkx==3.3
numpy==1.26.4
nvidia-cublas-cu12==12.1.3.1
nvidia-cublas-cu12
nvidia-cuda-cupti-cu12==12.1.105
nvidia-cuda-nvrtc-cu12==12.1.105
nvidia-cuda-runtime-cu12==12.1.105
Expand Down

0 comments on commit 7e988a6

Please sign in to comment.