Commit 28195f0f authored by novelailab's avatar novelailab

better layering

parent d1851529
FROM nvidia/cuda:11.3.1-base-ubuntu20.04 FROM nvidia/cuda:11.3.1-base-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
#Install Torch(chonky!)
RUN pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
#Install core packages #Install core packages
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
libncurses5 python3 python3-pip curl git apt-utils ssh ca-certificates \ libncurses5 python3 python3-pip curl git apt-utils ssh ca-certificates \
...@@ -11,8 +14,9 @@ RUN apt-get update && apt-get install -y \ ...@@ -11,8 +14,9 @@ RUN apt-get update && apt-get install -y \
pip3 install --no-cache-dir --upgrade pip pip3 install --no-cache-dir --upgrade pip
#Install Python deps #Install Python deps
RUN pip3 install --no-cache-dir dotmap icecream sentry-sdk numpy fastapi "uvicorn[standard]" gunicorn https://github.com/NovelAI/stable-diffusion/archive/ced6bcee86406be352fdc01314252b9b24357dcb.zip RUN pip3 install --no-cache-dir dotmap icecream sentry-sdk numpy fastapi "uvicorn[standard]" gunicorn
RUN pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113 RUN pip3 install omegaconf transformers einops
RUN pip3 install https://github.com/NovelAI/stable-diffusion/archive/ced6bcee86406be352fdc01314252b9b24357dcb.zip
#Open ports #Open ports
EXPOSE 8080 EXPOSE 8080
...@@ -28,5 +32,4 @@ EXPOSE 50051 ...@@ -28,5 +32,4 @@ EXPOSE 50051
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY . . COPY . .
RUN pip3 install omegaconf transformers einops
CMD [ "gunicorn", "main:app --workers 1 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:80" ] CMD [ "gunicorn", "main:app --workers 1 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:80" ]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment