Ibraaheem commited on
Commit
53bb329
·
1 Parent(s): 3ad6797

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -9
Dockerfile CHANGED
@@ -9,15 +9,6 @@ ENV PATH="/root/.local/bin:$PATH"
9
  # https://python-poetry.org/docs/configuration/#virtualenvsin-project
10
  ENV POETRY_VIRTUALENVS_IN_PROJECT=true
11
 
12
- # Expose the secret SECRET_EXAMPLE at buildtime and use its value as git remote URL
13
- RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
14
- git init && \
15
- git remote add origin $(cat /run/secrets/SECRET_EXAMPLE)
16
-
17
- # Expose the secret SECRET_EXAMPLE at buildtime and use its value as a Bearer token for a curl request
18
- RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
19
- curl test -H 'Authorization: Bearer $(cat /run/secrets/OPENAI_API_KEY)'
20
-
21
  FROM base as dependencies
22
  WORKDIR /home/worker/app
23
  COPY pyproject.toml poetry.lock ./
@@ -49,5 +40,14 @@ COPY --chown=worker *.yaml *.md ./
49
 
50
  USER worker
51
 
 
 
 
 
 
 
 
 
 
52
  # Activate the virtual environment and run uvicorn
53
  CMD [".venv/bin/python", "-m", "uvicorn", "private_gpt.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
9
  # https://python-poetry.org/docs/configuration/#virtualenvsin-project
10
  ENV POETRY_VIRTUALENVS_IN_PROJECT=true
11
 
 
 
 
 
 
 
 
 
 
12
  FROM base as dependencies
13
  WORKDIR /home/worker/app
14
  COPY pyproject.toml poetry.lock ./
 
40
 
41
  USER worker
42
 
43
+ # Expose the secret SECRET_EXAMPLE at buildtime and use its value as git remote URL
44
+ RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
45
+ git init && \
46
+ git remote add origin $(cat /run/secrets/SECRET_EXAMPLE)
47
+
48
+ # Expose the secret SECRET_EXAMPLE at buildtime and use its value as a Bearer token for a curl request
49
+ RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
50
+ curl test -H 'Authorization: Bearer $(cat /run/secrets/OPENAI_API_KEY)'
51
+
52
  # Activate the virtual environment and run uvicorn
53
  CMD [".venv/bin/python", "-m", "uvicorn", "private_gpt.main:app", "--host", "0.0.0.0", "--port", "7860"]