Abhishek commited on
Commit
1413ebb
·
1 Parent(s): df0b69a

fix: change model download path to models/ to avoid persistent storage mount hiding files

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -3
Dockerfile CHANGED
@@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
5
  PORT=7860 \
6
  HOST=0.0.0.0 \
7
  GRADIO_SERVER_NAME=0.0.0.0 \
8
- P5_FLUX_MODEL_DIR=/data/FLUX.2-klein-base-4B
9
 
10
  RUN apt-get update \
11
  && apt-get install -y --no-install-recommends git ca-certificates libcurl4 libgomp1 libstdc++6 \
@@ -31,8 +31,8 @@ RUN mkdir -p /data && chown -R user:user /data
31
  USER user
32
  RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=false \
33
  if [ -f /run/secrets/HF_TOKEN ]; then export HF_TOKEN=$(cat /run/secrets/HF_TOKEN); fi && \
34
- python scripts/download_model.py black-forest-labs/FLUX.2-klein-base-4B /data/FLUX.2-klein-base-4B && \
35
- python scripts/download_model.py openbmb/MiniCPM5-1B /data/MiniCPM5-1B
36
 
37
  EXPOSE 7860
38
  CMD ["python", "app.py"]
 
5
  PORT=7860 \
6
  HOST=0.0.0.0 \
7
  GRADIO_SERVER_NAME=0.0.0.0 \
8
+ P5_FLUX_MODEL_DIR=models/FLUX.2-klein-base-4B
9
 
10
  RUN apt-get update \
11
  && apt-get install -y --no-install-recommends git ca-certificates libcurl4 libgomp1 libstdc++6 \
 
31
  USER user
32
  RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=false \
33
  if [ -f /run/secrets/HF_TOKEN ]; then export HF_TOKEN=$(cat /run/secrets/HF_TOKEN); fi && \
34
+ python scripts/download_model.py black-forest-labs/FLUX.2-klein-base-4B models/FLUX.2-klein-base-4B && \
35
+ python scripts/download_model.py openbmb/MiniCPM5-1B models/MiniCPM5-1B
36
 
37
  EXPOSE 7860
38
  CMD ["python", "app.py"]