Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files11 unmodified lines12131415161516171819171819202122232425262728293011 unmodified lines# Set Hugging Face cache for all model downloads (best practice for Spaces)# ENV HF_HOME="/workspace/.cache/huggingface"# RUN mkdir -p /workspace/.cache/huggingface
ENV CACHE_DIR="/workspace/.cache"ENV HF_HOME="/workspace/.cache/huggingface"ENV TRANSFORMERS_CACHE="/workspace/.cache/huggingface"RUN mkdir -p /workspace/.cache/huggingface/hub && \ chmod -R 777 /workspace/.cache# ENV CACHE_DIR="/workspace/.cache"# ENV HF_HOME="/workspace/.cache/huggingface"# ENV TRANSFORMERS_CACHE="/workspace/.cache/huggingface"# RUN mkdir -p /workspace/.cache/huggingface/hub && \# chmod -R 777 /workspace/.cache
ENV CACHE_DIR="/data"ENV HF_HOME="/data/huggingface"ENV TRANSFORMERS_CACHE="/data/huggingface"RUN mkdir -p /data/huggingface/.locks && chmod -R 777 /data
# Pre-download Stable Diffusion v1-5 weights into cacheRUN python -c "import torch; from diffusers import StableDiffusionImg2ImgPipeline; StableDiffusionImg2ImgPipeline.from_pretrained('runwayml/stable-diffusion-v1-5', cache_dir='/workspace/.cache/huggingface', torch_dtype=torch.float32)"Dockerfile+13-5