Spaces:
Sleeping
Sleeping
Praneeth Yerrapragada commited on
Commit ·
1051b46
1
Parent(s): 1bcc93c
build: switch to using pip
Browse files- Dockerfile +14 -25
- poetry.lock +0 -0
- pyproject.toml +0 -39
- requirements.txt +11 -0
Dockerfile
CHANGED
|
@@ -1,30 +1,19 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
ENV HOME=/home/user \
|
| 6 |
-
POETRY_HOME=/opt/poetry \
|
| 7 |
-
POETRY_CACHE_DIR=/tmp/poetry_cache \
|
| 8 |
-
PATH="/home/user/.local/bin:$POETRY_HOME/bin:$PATH"
|
| 9 |
-
WORKDIR $HOME/app
|
| 10 |
|
| 11 |
-
|
|
|
|
| 12 |
|
| 13 |
-
# Install
|
| 14 |
-
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install
|
| 15 |
-
RUN
|
|
|
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
|
| 19 |
-
# RUN apt update && apt install -y chromium chromium-driver
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
| 23 |
-
RUN --mount=type=cache,target=$POETRY_CACHE_DIR poetry install --no-root --without dev
|
| 24 |
-
|
| 25 |
-
# ====================================
|
| 26 |
-
FROM python:3.11-slim-buster as release
|
| 27 |
-
|
| 28 |
-
COPY . .
|
| 29 |
-
|
| 30 |
-
ENTRYPOINT ["python", "main.py"]
|
|
|
|
| 1 |
+
# Use an official Python runtime as a parent image
|
| 2 |
+
FROM python:3.11
|
| 3 |
|
| 4 |
+
# Set the working directory to /app
|
| 5 |
+
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
# Add the current directory contents into the container at /app
|
| 8 |
+
ADD . /app
|
| 9 |
|
| 10 |
+
# Install any needed packages specified in requirements.txt
|
| 11 |
+
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install --upgrade pip
|
| 12 |
+
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install pipenv && pipenv install
|
| 13 |
+
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install -r requirements.txt
|
| 14 |
|
| 15 |
+
# Make port 8000 available to the world outside this container
|
| 16 |
+
EXPOSE 8000
|
|
|
|
| 17 |
|
| 18 |
+
# Run app.py when the container launches
|
| 19 |
+
CMD ["python", "main.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
poetry.lock
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pyproject.toml
DELETED
|
@@ -1,39 +0,0 @@
|
|
| 1 |
-
[tool]
|
| 2 |
-
[tool.poetry]
|
| 3 |
-
name = "app"
|
| 4 |
-
version = "0.1.0"
|
| 5 |
-
description = ""
|
| 6 |
-
authors = [ "Marcus Schiesser <mail@marcusschiesser.de>" ]
|
| 7 |
-
readme = "README.md"
|
| 8 |
-
|
| 9 |
-
[tool.poetry.scripts]
|
| 10 |
-
generate = "app.engine.generate:generate_datasource"
|
| 11 |
-
|
| 12 |
-
[tool.poetry.dependencies]
|
| 13 |
-
python = "^3.11,<3.12"
|
| 14 |
-
fastapi = "^0.109.1"
|
| 15 |
-
python-dotenv = "^1.0.0"
|
| 16 |
-
aiostream = "^0.5.2"
|
| 17 |
-
llama-index = "0.10.28"
|
| 18 |
-
llama-index-core = "0.10.28"
|
| 19 |
-
cachetools = "^5.3.3"
|
| 20 |
-
|
| 21 |
-
[tool.poetry.dependencies.uvicorn]
|
| 22 |
-
extras = [ "standard" ]
|
| 23 |
-
version = "^0.23.2"
|
| 24 |
-
|
| 25 |
-
[tool.poetry.dependencies.llama-index-vector-stores-pinecone]
|
| 26 |
-
version = "^0.1.3"
|
| 27 |
-
|
| 28 |
-
[tool.poetry.dependencies.docx2txt]
|
| 29 |
-
version = "^0.8"
|
| 30 |
-
|
| 31 |
-
[tool.poetry.dependencies.llama-index-agent-openai]
|
| 32 |
-
version = "0.2.2"
|
| 33 |
-
|
| 34 |
-
[tool.poetry.dependencies.traceloop-sdk]
|
| 35 |
-
version = "^0.15.11"
|
| 36 |
-
|
| 37 |
-
[build-system]
|
| 38 |
-
requires = [ "poetry-core" ]
|
| 39 |
-
build-backend = "poetry.core.masonry.api"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
aiostream==0.5.2
|
| 2 |
+
cachetools==5.3.3
|
| 3 |
+
docx2txt==0.8
|
| 4 |
+
fastapi==0.109.1
|
| 5 |
+
llama-index-agent-openai==0.2.2
|
| 6 |
+
llama-index-core==0.10.28
|
| 7 |
+
llama-index-vector-stores-pinecone==0.1.3
|
| 8 |
+
llama-index==0.10.28
|
| 9 |
+
python-dotenv==1.0.0
|
| 10 |
+
traceloop-sdk==0.15.11
|
| 11 |
+
uvicorn==0.23.2
|