Spaces:
Build error
Build error
Fix write permission and library access
Browse files- Dockerfile +8 -3
- realtime_ai_character/database/chroma.py +1 -1
Dockerfile
CHANGED
|
@@ -10,14 +10,19 @@ WORKDIR /realtime_ai_character
|
|
| 10 |
COPY requirements.txt /realtime_ai_character
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /realtime_ai_character/requirements.txt
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# Copy the project files
|
| 14 |
-
COPY --chown=user ./ /
|
| 15 |
|
| 16 |
# Expose 7860. port from the docker image.
|
| 17 |
EXPOSE 7860
|
| 18 |
|
| 19 |
# Make the entrypoint script executable
|
| 20 |
-
RUN chmod +x /
|
| 21 |
|
| 22 |
# Run the application
|
| 23 |
-
CMD ["/bin/sh", "/
|
|
|
|
| 10 |
COPY requirements.txt /realtime_ai_character
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /realtime_ai_character/requirements.txt
|
| 12 |
|
| 13 |
+
ENV HOME=/home/user \
|
| 14 |
+
PATH=/home/user/.local/bin:$PATH
|
| 15 |
+
|
| 16 |
+
WORKDIR $HOME/app
|
| 17 |
+
|
| 18 |
# Copy the project files
|
| 19 |
+
COPY --chown=user ./ $HOME/app
|
| 20 |
|
| 21 |
# Expose 7860. port from the docker image.
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
# Make the entrypoint script executable
|
| 25 |
+
RUN chmod +x $HOME/app/entrypoint.sh
|
| 26 |
|
| 27 |
# Run the application
|
| 28 |
+
CMD ["/bin/sh", "/home/user/app/entrypoint.sh"]
|
realtime_ai_character/database/chroma.py
CHANGED
|
@@ -17,6 +17,6 @@ def get_chroma():
|
|
| 17 |
chroma = Chroma(
|
| 18 |
collection_name='llm',
|
| 19 |
embedding_function=embedding,
|
| 20 |
-
persist_directory='/
|
| 21 |
)
|
| 22 |
return chroma
|
|
|
|
| 17 |
chroma = Chroma(
|
| 18 |
collection_name='llm',
|
| 19 |
embedding_function=embedding,
|
| 20 |
+
persist_directory='/home/user/app/chroma.db'
|
| 21 |
)
|
| 22 |
return chroma
|