mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 04:30:11 +01:00
chore: update entrypoint
This commit is contained in:
parent
fabc3f66bb
commit
f73a36af2f
3 changed files with 26 additions and 2 deletions
12
.docker/entrypoint.sh
Normal file
12
.docker/entrypoint.sh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Ensure correct ownership of the local_data directory
|
||||
chown -R worker /home/worker/app/local_data
|
||||
|
||||
# Ensure correct ownership of the models directory if it exists
|
||||
if [ -d "/home/worker/app/models" ]; then
|
||||
chown -R worker /home/worker/app/models
|
||||
fi
|
||||
|
||||
# Execute the command passed to the entrypoint
|
||||
exec "$@"
|
||||
|
|
@ -60,5 +60,11 @@ COPY --chown=worker private_gpt/ private_gpt
|
|||
COPY --chown=worker *.yaml .
|
||||
COPY --chown=worker scripts/ scripts
|
||||
|
||||
# Copy the entrypoint script and set correct permissions
|
||||
COPY ./.docker/entrypoint.sh /entrypoint.sh
|
||||
RUN chown worker /entrypoint.sh && \
|
||||
chmod +x /entrypoint.sh
|
||||
|
||||
USER worker
|
||||
ENTRYPOINT python -m private_gpt
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["python", "-m", "private_gpt"]
|
||||
|
|
@ -47,5 +47,11 @@ COPY --chown=worker private_gpt/ private_gpt
|
|||
COPY --chown=worker *.yaml .
|
||||
COPY --chown=worker scripts/ scripts
|
||||
|
||||
# Copy the entrypoint script and set correct permissions
|
||||
COPY ./.docker/entrypoint.sh /entrypoint.sh
|
||||
RUN chown worker /entrypoint.sh && \
|
||||
chmod +x /entrypoint.sh
|
||||
|
||||
USER worker
|
||||
ENTRYPOINT python -m private_gpt
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["python", "-m", "private_gpt"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue