Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
@@ -18,7 +18,6 @@ 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
|
22 |
|
23 |
FROM base as app
|
24 |
|
@@ -40,5 +39,9 @@ RUN touch local_data/private_gpt/chroma_db/meta.json && chown worker local_data/
|
|
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"]
|
|
|
18 |
RUN poetry config installer.max-workers 10
|
19 |
RUN poetry install --with ui
|
20 |
RUN poetry install --extras chroma
|
|
|
21 |
|
22 |
FROM base as app
|
23 |
|
|
|
39 |
RUN chmod 777 local_data/private_gpt/chroma_db
|
40 |
USER worker
|
41 |
|
42 |
+
# Create and activate virtual environment
|
43 |
+
RUN python -m venv .venv
|
44 |
+
ENV PATH="/home/worker/app/.venv/bin:$PATH"
|
45 |
+
|
46 |
# Print the contents of .venv/bin and run uvicorn
|
47 |
CMD ["sh", "-c", "ls -l .venv/bin && .venv/bin/uvicorn private_gpt.main:app --host 0.0.0.0 --port 7860"]
|