File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 2727 run : uv python install 3.10
2828
2929 - name : install python packages
30- run : uv pip install --system .
30+ run : uv sync
3131
3232 - name : track large files
3333 run : git lfs track "database/pipeline.pkl"
4040 ZOTERO_API_KEY : ${{ secrets.ZOTERO_API_KEY }}
4141 ZOTERO_LIBRARY_ID : ${{ secrets.ZOTERO_LIBRARY_ID }}
4242 HUGGINGFACE_TOKEN : ${{ secrets.HUGGINGFACE_TOKEN }}
43- run : python run.py
43+ run : uv run python run.py
4444
4545 - name : commit files
4646 run : |
Original file line number Diff line number Diff line change 1515 name : Deploy app
1616 runs-on : ubuntu-latest
1717 steps :
18- - uses : actions/checkout@v2
18+ - uses : actions/checkout@v4
1919 with :
2020 lfs : true
2121 - uses : superfly/flyctl-actions/setup-flyctl@master
Original file line number Diff line number Diff line change @@ -3,20 +3,20 @@ FROM python:3.10-slim
33# Install uv
44COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
55
6- # Clone the repository
76WORKDIR /code
87
98# Copy the necessary files
10- COPY database/pipeline.pkl /code/database/pipeline.pkl
119COPY pyproject.toml /code/pyproject.toml
10+ COPY readme.md /code/readme.md
11+ COPY database/pipeline.pkl /code/database/pipeline.pkl
1212COPY knowledge_database /code/knowledge_database
1313COPY api /code/api
1414
15- # Install Python dependencies using uv
16- RUN uv pip install --system .
15+ # Install Python dependencies using uv with a virtual environment
16+ RUN uv venv /code/.venv && uv pip install --python /code/.venv/bin/python .
1717
1818# Set up the secret environment variable for OpenAI API Key
1919RUN --mount=type=secret,id=OPENAI_API_KEY sh -c 'echo "export OPENAI_API_KEY=$(cat /run/secrets/OPENAI_API_KEY)" >> /etc/profile.d/openai.sh'
2020
2121# Set the command to run the application
22- CMD ["/bin/bash" , "-c" , "source /etc/profile && uvicorn api.api:app --host 0.0.0.0 --port 8080" ]
22+ CMD ["/bin/bash" , "-c" , "source /etc/profile && /code/.venv/bin/ uvicorn api.api:app --host 0.0.0.0 --port 8080" ]
You can’t perform that action at this time.
0 commit comments