nikhilkomakula commited on
Commit
37318af
·
1 Parent(s): a10b333
Files changed (2) hide show
  1. .github/workflows/main.yml +2 -2
  2. Dockerfile +4 -3
.github/workflows/main.yml CHANGED
@@ -31,11 +31,11 @@ jobs:
31
  env:
32
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
33
  run: |
34
- git remote add space https://nikhilkomakula:$HF_TOKEN@huggingface.co/spaces/nikhilkomakula/llm-rag-op-chatbot || true
35
 
36
  - name: Push to hub
37
  env:
38
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
39
  run: |
40
- git push --force https://nikhilkomakula:$HF_TOKEN@huggingface.co/spaces/nikhilkomakula/llm-rag-op-chatbot main
41
  exit 0
 
31
  env:
32
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
33
  run: |
34
+ git remote add space https://nikhilkomakula:$HF_TOKEN@huggingface.co/spaces/nikhilkomakula/llm-rag-op-chatbot1 || true
35
 
36
  - name: Push to hub
37
  env:
38
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
39
  run: |
40
+ git push --force https://nikhilkomakula:$HF_TOKEN@huggingface.co/spaces/nikhilkomakula/llm-rag-op-chatbot1 main
41
  exit 0
Dockerfile CHANGED
@@ -15,8 +15,9 @@ RUN apt-get update && \
15
  apt-get install -y git && \
16
  apt-get install -y git-lfs
17
 
18
- # Clone Git Repo
19
- RUN git clone --depth 1 https://huggingface.co/spaces/nikhilkomakula/llm-rag-op-chatbot /code/llm-rag-op-chatbot
 
20
 
21
  # Set up a new user named "user" with user ID 1000
22
  RUN useradd -m -u 1000 user
@@ -37,7 +38,7 @@ COPY --chown=user src $HOME/app/src
37
  COPY --chown=user indexes $HOME/app/indexes
38
 
39
  # Copy git lfs files and pull them
40
- RUN cd /code/llm-rag-op-chatbot/indexes && \
41
  git lfs pull -I "indexes/chroma.sqlite3" && \
42
  cd c607d7bb-5476-4bdc-8df3-36895a74111c && \
43
  git lfs pull -I "indexes/c607d7bb-5476-4bdc-8df3-36895a74111c/data_level0.bin"
 
15
  apt-get install -y git && \
16
  apt-get install -y git-lfs
17
 
18
+ # Expose the secret SECRET_EXAMPLE at buildtime and use its value to clone the repo
19
+ RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
20
+ git clone --depth 1 https://nikhilkomakula:$(cat /run/secrets/HF_TOKEN)@huggingface.co/spaces/nikhilkomakula/llm-rag-op-chatbot1 /code/llm-rag-op-chatbot1
21
 
22
  # Set up a new user named "user" with user ID 1000
23
  RUN useradd -m -u 1000 user
 
38
  COPY --chown=user indexes $HOME/app/indexes
39
 
40
  # Copy git lfs files and pull them
41
+ RUN cd /code/llm-rag-op-chatbot1/indexes && \
42
  git lfs pull -I "indexes/chroma.sqlite3" && \
43
  cd c607d7bb-5476-4bdc-8df3-36895a74111c && \
44
  git lfs pull -I "indexes/c607d7bb-5476-4bdc-8df3-36895a74111c/data_level0.bin"