Spaces:
Running
Running
File size: 611 Bytes
d3b5ef6 11a5220 d3b5ef6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | FROM mambaorg/micromamba:1.5.8
WORKDIR /app
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml
RUN micromamba create -y -f /tmp/environment.yml && micromamba clean --all --yes
COPY --chown=$MAMBA_USER:$MAMBA_USER . /app
# Run as root to avoid PermissionError on HF Spaces persistent volumes
# (mounted /data is owned by root; switching USER before app start is the simplest fix).
USER root
ENV AIGC_ARTIFACT_ROOT=/data/outputs
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
ENV PYTHONUNBUFFERED=1
EXPOSE 7860
CMD ["micromamba", "run", "-n", "aigc", "python", "app.py"]
|