mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
update Dockerfile
- introduce build arg `VOLUME_DIR` - fix permissions of the Volume
This commit is contained in:
parent
d9cb6da951
commit
7be5b4ca8b
@ -85,14 +85,19 @@ RUN useradd \
|
|||||||
-m \
|
-m \
|
||||||
-U \
|
-U \
|
||||||
"${UNAME}"
|
"${UNAME}"
|
||||||
USER ${UNAME}
|
|
||||||
|
# create volume directory
|
||||||
|
ARG VOLUME_DIR=/data
|
||||||
|
RUN mkdir -p "${VOLUME_DIR}" \
|
||||||
|
&& chown -R "${UNAME}" "${VOLUME_DIR}"
|
||||||
|
|
||||||
# setup runtime environment
|
# setup runtime environment
|
||||||
|
USER ${UNAME}
|
||||||
COPY --chown=${UNAME} --from=pyproject-builder ${APPDIR}/${APPNAME} ${APPNAME}
|
COPY --chown=${UNAME} --from=pyproject-builder ${APPDIR}/${APPNAME} ${APPNAME}
|
||||||
ENV INVOKEAI_ROOT /data
|
ENV INVOKEAI_ROOT ${VOLUME_DIR}
|
||||||
ENV TRANSFORMERS_CACHE /data/.cache
|
ENV TRANSFORMERS_CACHE ${VOLUME_DIR}/.cache
|
||||||
ENV INVOKE_MODEL_RECONFIGURE "--yes --default_only"
|
ENV INVOKE_MODEL_RECONFIGURE "--yes --default_only"
|
||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
ENTRYPOINT [ "invokeai" ]
|
ENTRYPOINT [ "invokeai" ]
|
||||||
CMD [ "--web", "--host", "0.0.0.0", "--port", "9090" ]
|
CMD [ "--web", "--host", "0.0.0.0", "--port", "9090" ]
|
||||||
VOLUME [ "/data" ]
|
VOLUME [ "${VOLUME_DIR}" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user