Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -10
Dockerfile
CHANGED
@@ -16,13 +16,6 @@ COPY pyproject.toml poetry.lock ./
|
|
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 |
-
|
20 |
-
# Allow the user to write to the project directory
|
21 |
-
RUN mkdir -p /home/worker/app/local_data/private_gpt/chroma_db && chown -R worker /home/worker/app
|
22 |
-
|
23 |
-
USER worker
|
24 |
-
|
25 |
-
# Install dependencies inside the virtual environment
|
26 |
RUN poetry install --with ui
|
27 |
RUN poetry install --extras chroma
|
28 |
RUN pip install fastapi uvicorn
|
@@ -45,7 +38,7 @@ RUN touch local_data/private_gpt/chroma_db/meta.json && chown worker local_data/
|
|
45 |
|
46 |
# Allow the user to write to the chroma_db directory
|
47 |
RUN chmod 777 local_data/private_gpt/chroma_db
|
48 |
-
|
49 |
-
# Activate the virtual environment and run uvicorn
|
50 |
USER worker
|
51 |
-
|
|
|
|
|
|
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 poetry install --extras chroma
|
21 |
RUN pip install fastapi uvicorn
|
|
|
38 |
|
39 |
# Allow the user to write to the chroma_db directory
|
40 |
RUN chmod 777 local_data/private_gpt/chroma_db
|
|
|
|
|
41 |
USER worker
|
42 |
+
|
43 |
+
# Print the contents of .venv/bin and run uvicorn
|
44 |
+
CMD ["sh", "-c", "ls -l .venv/bin && .venv/bin/uvicorn private_gpt.main:app --host 0.0.0.0 --port 7860"]
|