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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -6
Dockerfile CHANGED
@@ -11,14 +11,12 @@ ENV POETRY_VIRTUALENVS_IN_PROJECT=true
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
22
 
23
  FROM base as app
24
 
@@ -30,8 +28,8 @@ EXPOSE 8080
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
 
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
 
21
  FROM base as app
22
 
 
28
  RUN adduser --system worker
29
  WORKDIR /home/worker/app
30
 
31
+ RUN mkdir local_data; chown worker local_data
32
+ RUN mkdir models; chown worker models
33
 
34
  # Copy only the necessary files for the app
35
  COPY --chown=worker --from=dependencies /home/worker/app/.venv/ .venv