feat(docker): update Dockerfile for improved installation process and enhance deployment documentation with Docker Compose setup and API token security

This commit is contained in:
UncleCode
2024-11-16 18:19:44 +08:00
parent 6360d0545a
commit 9139ef3125
2 changed files with 86 additions and 46 deletions

View File

@@ -79,7 +79,6 @@ COPY . .
RUN pip install --no-cache-dir -r requirements.txt
# Install required library for FastAPI
RUN pip install .
RUN pip install fastapi uvicorn psutil
# Install ML dependencies first for better layer caching
@@ -97,15 +96,15 @@ RUN if [ "$INSTALL_TYPE" = "all" ] ; then \
# Install the package
RUN if [ "$INSTALL_TYPE" = "all" ] ; then \
pip install -e ".[all]" && \
pip install ".[all]" && \
python -m crawl4ai.model_loader ; \
elif [ "$INSTALL_TYPE" = "torch" ] ; then \
pip install -e ".[torch]" ; \
pip install ".[torch]" ; \
elif [ "$INSTALL_TYPE" = "transformer" ] ; then \
pip install -e ".[transformer]" && \
pip install ".[transformer]" && \
python -m crawl4ai.model_loader ; \
else \
pip install -e "." ; \
pip install "." ; \
fi
# Install MkDocs and required plugins