onediff-demo / Dockerfile
J5Tsai's picture
ONEFLOW_MLIR_PREFER_NHWC=0
f0bd14c
raw
history blame
836 Bytes
FROM oneflowinc/onediff:cu118
# FROM ubuntu:22.04
ARG LIVE_XL_TAR=live_xl_rel_ubuntu-22.04_202403190935.tar
EXPOSE 7860
RUN apt-get update -y && apt-get install -y build-essential git curl wget tar python3 \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
# The Space container runs with user ID 1000
RUN useradd -m -u 1000 user
ENV HOME=/home/user
USER user
WORKDIR /web-app
RUN wget https://github.com/jackalcooper/live_xl/releases/download/latest/${LIVE_XL_TAR}
RUN tar xf ${LIVE_XL_TAR}
ENV PORT=7860 SECRET_KEY_BASE="Z/VeN8hw0cQruiL3YyWG52IPq+hnG9Ucj1RuW0263Iddmd8f+j7i/b7NCs1fiLCx"
ENV LIVE_XL_LIGHTNING_ARGS="--base stabilityai/stable-diffusion-xl-base-1.0 --repo ByteDance/SDXL-Lightning --cpkt sdxl_lightning_2step_unet.safetensors"
ENV ONEDIFF_DEBUG=1 ONEFLOW_MLIR_PREFER_NHWC=0
CMD [ "live_xl/bin/server", "start" ]