Ibraaheem commited on
Commit
78059c1
·
1 Parent(s): 611ab8e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -11,10 +11,11 @@ ENV POETRY_VIRTUALENVS_IN_PROJECT=true
11
 
12
  FROM base as dependencies
13
  WORKDIR /home/worker/app
14
- COPY pyproject.toml poetry.lock ./
 
 
15
 
16
  # Explicitly copy the project files before running poetry install
17
- COPY pyproject.toml poetry.lock ./
18
  RUN poetry config installer.max-workers 10
19
  RUN poetry install --with ui
20
  RUN pip install fastapi uvicorn
@@ -29,8 +30,8 @@ EXPOSE 8080
29
  RUN adduser --system worker
30
  WORKDIR /home/worker/app
31
 
32
- RUN mkdir local_data; chown worker local_data
33
- RUN mkdir models; chown worker models
34
 
35
  # Copy only the necessary files for the app
36
  COPY --chown=worker --from=dependencies /home/worker/app/.venv/ .venv
 
11
 
12
  FROM base as dependencies
13
  WORKDIR /home/worker/app
14
+
15
+ # Copy the entire project before running poetry install
16
+ COPY . .
17
 
18
  # Explicitly copy the project files before running poetry install
 
19
  RUN poetry config installer.max-workers 10
20
  RUN poetry install --with ui
21
  RUN pip install fastapi uvicorn
 
30
  RUN adduser --system worker
31
  WORKDIR /home/worker/app
32
 
33
+ # Ensure proper permissions for local_data directory
34
+ RUN mkdir -p local_data/private_gpt && chown -R worker:worker local_data
35
 
36
  # Copy only the necessary files for the app
37
  COPY --chown=worker --from=dependencies /home/worker/app/.venv/ .venv