Spaces:
Runtime error
Runtime error
Push
Browse files- Dockerfile +5 -5
- src/__pycache__/server.cpython-39.pyc +0 -0
- src/server.py +4 -0
Dockerfile
CHANGED
@@ -7,6 +7,11 @@ ENV PYTHONUNBUFFERED True
|
|
7 |
# Set the working directory in the container.
|
8 |
WORKDIR /code
|
9 |
|
|
|
|
|
|
|
|
|
|
|
10 |
COPY .env .
|
11 |
COPY LICENSE .
|
12 |
|
@@ -16,9 +21,4 @@ COPY /web/blueprint/build ./web/blueprint/build
|
|
16 |
# Copy python files.
|
17 |
COPY /src ./src/
|
18 |
|
19 |
-
# Install the dependencies. This requires exporting requirements.txt from poetry first, which
|
20 |
-
# happens from ./build_docker.sh.
|
21 |
-
COPY requirements.txt .
|
22 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
23 |
-
|
24 |
CMD ["uvicorn", "src.server:app", "--host", "0.0.0.0", "--port", "5432"]
|
|
|
7 |
# Set the working directory in the container.
|
8 |
WORKDIR /code
|
9 |
|
10 |
+
# Install the dependencies. This requires exporting requirements.txt from poetry first, which
|
11 |
+
# happens from ./build_docker.sh.
|
12 |
+
COPY requirements.txt .
|
13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
14 |
+
|
15 |
COPY .env .
|
16 |
COPY LICENSE .
|
17 |
|
|
|
21 |
# Copy python files.
|
22 |
COPY /src ./src/
|
23 |
|
|
|
|
|
|
|
|
|
|
|
24 |
CMD ["uvicorn", "src.server:app", "--host", "0.0.0.0", "--port", "5432"]
|
src/__pycache__/server.cpython-39.pyc
CHANGED
Binary files a/src/__pycache__/server.cpython-39.pyc and b/src/__pycache__/server.cpython-39.pyc differ
|
|
src/server.py
CHANGED
@@ -10,6 +10,7 @@ from fastapi.routing import APIRoute
|
|
10 |
from fastapi.staticfiles import StaticFiles
|
11 |
|
12 |
from . import router_concept, router_data_loader, router_dataset, router_signal, router_tasks
|
|
|
13 |
from .router_utils import RouteErrorHandler
|
14 |
from .tasks import task_manager
|
15 |
|
@@ -52,6 +53,9 @@ app.include_router(v1_router, prefix='/api/v1')
|
|
52 |
# Serve static files in production mode.
|
53 |
app.mount('/', StaticFiles(directory=os.path.join(DIST_PATH), html=True, check_dir=False))
|
54 |
|
|
|
|
|
|
|
55 |
|
56 |
@app.on_event('shutdown')
|
57 |
async def shutdown_event() -> None:
|
|
|
10 |
from fastapi.staticfiles import StaticFiles
|
11 |
|
12 |
from . import router_concept, router_data_loader, router_dataset, router_signal, router_tasks
|
13 |
+
from .config import CONFIG, data_path
|
14 |
from .router_utils import RouteErrorHandler
|
15 |
from .tasks import task_manager
|
16 |
|
|
|
53 |
# Serve static files in production mode.
|
54 |
app.mount('/', StaticFiles(directory=os.path.join(DIST_PATH), html=True, check_dir=False))
|
55 |
|
56 |
+
print('data_path=', data_path(), CONFIG)
|
57 |
+
print('list:', os.listdir(data_path()))
|
58 |
+
|
59 |
|
60 |
@app.on_event('shutdown')
|
61 |
async def shutdown_event() -> None:
|