avfranco commited on
Commit
f3129df
·
1 Parent(s): 01309b3

ea4all-docker-load-private-from-public-spaces

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -6,17 +6,18 @@ RUN useradd -m -u 1000 user
6
  # Switch to the "user" user
7
  USER user
8
 
9
- # Set the working directory to the user's home directory
10
- WORKDIR $HOME
11
-
12
  # Set home to the user's home directory
13
  ENV HOME=/home/user \
14
  PATH=/home/user/.local/bin:$PATH
15
 
 
 
 
16
  # Get secret OPENAI_API_KEY and clone it as repo at buildtime / changed required to true
17
  RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true
18
  RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
19
  cat /run/secrets/HF_TOKEN > /home/user/cli_token
 
20
  RUN pip install -U "huggingface_hub[cli]"
21
  RUN git init & git config --global credential.helper store
22
  RUN huggingface-cli login --token $(cat /home/user/cli_token) --add-to-git-credential
@@ -29,7 +30,7 @@ COPY --chown=user . $HOME
29
  #WORKDIR /home/user/ea4all-agent
30
  #RUN pip install --no-cache-dir --upgrade -r requirements.txt
31
 
32
- RUN git clone -b main https://huggingface.co/spaces/avfranco/ea4all-docker-demo
33
  WORKDIR /home/user/ea4all-docker-demo
34
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
35
 
 
6
  # Switch to the "user" user
7
  USER user
8
 
 
 
 
9
  # Set home to the user's home directory
10
  ENV HOME=/home/user \
11
  PATH=/home/user/.local/bin:$PATH
12
 
13
+ # Set the working directory to the user's home directory
14
+ WORKDIR $HOME
15
+
16
  # Get secret OPENAI_API_KEY and clone it as repo at buildtime / changed required to true
17
  RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true
18
  RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
19
  cat /run/secrets/HF_TOKEN > /home/user/cli_token
20
+
21
  RUN pip install -U "huggingface_hub[cli]"
22
  RUN git init & git config --global credential.helper store
23
  RUN huggingface-cli login --token $(cat /home/user/cli_token) --add-to-git-credential
 
30
  #WORKDIR /home/user/ea4all-agent
31
  #RUN pip install --no-cache-dir --upgrade -r requirements.txt
32
 
33
+ RUN git clone https://huggingface.co/spaces/avfranco/ea4all-docker-demo
34
  WORKDIR /home/user/ea4all-docker-demo
35
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
36