mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-01-19 13:23:23 +08:00
update
This commit is contained in:
parent
95cf1d304d
commit
9ec5d86678
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -48,7 +48,7 @@ jobs:
|
||||
image_config:
|
||||
- IMAGE_NAME: backend-aimingmedai
|
||||
BUILD_CONTEXT: ./app/backend
|
||||
DOCKERFILE: ./app/backend/Dockerfile.prod
|
||||
DOCKERFILE: ./app/backend/Dockerfile
|
||||
- IMAGE_NAME: frontend-aimingmedai
|
||||
BUILD_CONTEXT: ./app/frontend
|
||||
DOCKERFILE: ./app/frontend/Dockerfile.test
|
||||
|
||||
@ -45,12 +45,12 @@ USER app
|
||||
RUN pipenv run python utils/initialize_sentence_transformer.py
|
||||
|
||||
# pytest
|
||||
RUN pipenv run pytest tests --disable-warnings
|
||||
RUN export DEEPSEEK_API_KEY=sk-XXXXXXXXXX; export TAVILY_API_KEY=tvly-dev-wXXXXXX;\
|
||||
pipenv run pytest tests --disable-warnings
|
||||
|
||||
# expose the port the app runs on
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
# run uvicorn
|
||||
CMD ["pipenv", "run", "uvicorn", "main:app", "--reload", "--workers", "1", "--host", "0.0.0.0", "--port", "80"]
|
||||
|
||||
|
||||
@ -13,12 +13,23 @@ ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV ENVIRONMENT=dev
|
||||
ENV TESTING=1
|
||||
ENV CUDA_VISIBLE_DEVICES=""
|
||||
|
||||
# install python dependencies
|
||||
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv && rm -rf ~/.cache/pip
|
||||
COPY ./Pipfile .
|
||||
RUN pipenv install --deploy --dev
|
||||
RUN pipenv install --deploy --dev --no-cache-dir
|
||||
RUN pipenv run pip install torch --force-reinstall --no-cache-dir
|
||||
|
||||
# remove all cached files not needed to save space
|
||||
RUN pip cache purge
|
||||
RUN rm -rf /root/.cache
|
||||
|
||||
# Create cache directory and set permissions
|
||||
RUN mkdir -p /home/app/.cache/huggingface
|
||||
RUN chown -R app:app /home/app/.cache/huggingface
|
||||
RUN chown -R app:app $APP_HOME
|
||||
#
|
||||
# add app
|
||||
COPY . /usr/src/app
|
||||
RUN export DEEPSEEK_API_KEY=sk-XXXXXXXXXX; export TAVILY_API_KEY=tvly-dev-wXXXXXX;\
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user