Skip to content

Commit 2cf411b

Browse files
committed
feat: Resolving package issues and frontend
1 parent 43fffcb commit 2cf411b

File tree

5 files changed

+228
-6
lines changed

5 files changed

+228
-6
lines changed

Dockerfile.frontend

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Dockerfile.frontend
2+
FROM python:3.11-slim
3+
4+
WORKDIR /app
5+
6+
# Install dependencies
7+
COPY requirements.txt . # Make sure it includes streamlit, requests, streamlit-chat
8+
RUN pip install --no-cache-dir --upgrade pip
9+
RUN pip install --no-cache-dir -r requirements.txt
10+
11+
# Copy frontend code
12+
COPY src/app/frontend.py /app/frontend.py
13+
14+
# Expose Streamlit port
15+
EXPOSE 8501
16+
17+
# Run Streamlit
18+
CMD ["streamlit", "run", "frontend.py", "--server.port=8501", "--server.address=0.0.0.0"]

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ services:
2828
networks:
2929
- monitoring-net
3030

31+
# Streamlit Frontend
32+
frontend:
33+
build:
34+
context: .
35+
dockerfile: Dockerfile.frontend
36+
container_name: daraz-frontend
37+
ports:
38+
- "8501:8501"
39+
volumes:
40+
- ./src/app/frontend.py:/app/frontend.py
41+
environment:
42+
- FASTAPI_URL=http://app:8000 # This is important for your frontend to call FastAPI
43+
networks:
44+
- monitoring-net
45+
3146
# Prometheus Service (REQUIRED CONFIG)
3247
prometheus:
3348
image: prom/prometheus:latest

requirements.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ prometheus-fastapi-instrumentator
1616
prometheus_client
1717
fsspec
1818
tqdm
19-
19+
streamlit
20+
requests
21+
streamlit-chat
2022
# --- LLM & AI ---
2123
llama-index
2224
llama-index-core

requirements.txt

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ aiosqlite==0.21.0
1414
# via llama-index-core
1515
alembic==1.17.2
1616
# via mlflow
17+
altair==6.0.0
18+
# via streamlit
1719
annotated-doc==0.0.4
1820
# via fastapi
1921
annotated-types==0.7.0
@@ -29,18 +31,24 @@ anyio==4.12.0
2931
appdirs==1.4.4
3032
# via iterative-telemetry
3133
attrs==25.4.0
32-
# via aiohttp
34+
# via
35+
# aiohttp
36+
# jsonschema
37+
# referencing
3338
banks==2.2.0
3439
# via llama-index-core
3540
beautifulsoup4==4.14.3
3641
# via llama-index-readers-file
3742
blinker==1.9.0
38-
# via flask
43+
# via
44+
# flask
45+
# streamlit
3946
cachetools==6.2.2
4047
# via
4148
# google-auth
4249
# mlflow-skinny
4350
# mlflow-tracing
51+
# streamlit
4452
certifi==2025.11.12
4553
# via
4654
# evidently
@@ -60,6 +68,7 @@ click==8.3.1
6068
# mlflow-skinny
6169
# nltk
6270
# rich-click
71+
# streamlit
6372
# typer
6473
# uvicorn
6574
cloudpickle==3.1.2
@@ -151,7 +160,9 @@ fsspec==2025.12.0
151160
gitdb==4.0.12
152161
# via gitpython
153162
gitpython==3.1.45
154-
# via mlflow-skinny
163+
# via
164+
# mlflow-skinny
165+
# streamlit
155166
google-auth==2.43.0
156167
# via databricks-sdk
157168
graphene==3.4.3
@@ -214,15 +225,21 @@ itsdangerous==2.2.0
214225
# via flask
215226
jinja2==3.1.6
216227
# via
228+
# altair
217229
# banks
218230
# flask
231+
# pydeck
219232
# torch
220233
jiter==0.12.0
221234
# via openai
222235
joblib==1.5.2
223236
# via
224237
# nltk
225238
# scikit-learn
239+
jsonschema==4.25.1
240+
# via altair
241+
jsonschema-specifications==2025.9.1
242+
# via jsonschema
226243
kiwisolver==1.4.9
227244
# via matplotlib
228245
litestar==2.18.0
@@ -321,6 +338,8 @@ multipart==1.3.0
321338
# via litestar
322339
mypy-extensions==1.1.0
323340
# via typing-inspect
341+
narwhals==2.13.0
342+
# via altair
324343
nest-asyncio==1.6.0
325344
# via llama-index-core
326345
networkx==3.6
@@ -345,10 +364,12 @@ numpy==2.3.5
345364
# mlflow
346365
# pandas
347366
# patsy
367+
# pydeck
348368
# rouge-score
349369
# scikit-learn
350370
# scipy
351371
# statsmodels
372+
# streamlit
352373
# transformers
353374
nvidia-cublas-cu12==12.8.4.1 ; platform_machine == 'x86_64' and sys_platform == 'linux'
354375
# via
@@ -412,6 +433,7 @@ opentelemetry-semantic-conventions==0.60b0
412433
# via opentelemetry-sdk
413434
packaging==25.0
414435
# via
436+
# altair
415437
# deprecation
416438
# faiss-cpu
417439
# gunicorn
@@ -423,6 +445,7 @@ packaging==25.0
423445
# plotly
424446
# pytest
425447
# statsmodels
448+
# streamlit
426449
# transformers
427450
pandas==2.2.3
428451
# via
@@ -431,13 +454,15 @@ pandas==2.2.3
431454
# llama-index-readers-file
432455
# mlflow
433456
# statsmodels
457+
# streamlit
434458
patsy==1.0.2
435459
# via statsmodels
436460
pillow==12.0.0
437461
# via
438462
# llama-index-core
439463
# matplotlib
440464
# sentence-transformers
465+
# streamlit
441466
platformdirs==4.5.0
442467
# via
443468
# banks
@@ -469,10 +494,12 @@ protobuf==6.33.1
469494
# mlflow-skinny
470495
# mlflow-tracing
471496
# opentelemetry-proto
497+
# streamlit
472498
pyarrow==22.0.0
473499
# via
474500
# mlflow
475501
# pandas
502+
# streamlit
476503
pyasn1==0.6.1
477504
# via
478505
# pyasn1-modules
@@ -501,6 +528,8 @@ pydantic-core==2.41.5
501528
# via pydantic
502529
pydantic-settings==2.12.0
503530
# via -r requirements.in
531+
pydeck==0.9.1
532+
# via streamlit
504533
pygments==2.19.2
505534
# via
506535
# pytest
@@ -541,6 +570,10 @@ pyyaml==6.0.3
541570
# mlflow-skinny
542571
# transformers
543572
# uvicorn
573+
referencing==0.37.0
574+
# via
575+
# jsonschema
576+
# jsonschema-specifications
544577
regex==2025.11.3
545578
# via
546579
# nltk
@@ -556,6 +589,7 @@ requests==2.32.5
556589
# iterative-telemetry
557590
# llama-index-core
558591
# mlflow-skinny
592+
# streamlit
559593
# tiktoken
560594
# transformers
561595
rich==14.2.0
@@ -568,6 +602,10 @@ rich-click==1.9.4
568602
# via litestar
569603
rouge-score==0.1.2
570604
# via -r requirements.in
605+
rpds-py==0.30.0
606+
# via
607+
# jsonschema
608+
# referencing
571609
rsa==4.9.1
572610
# via google-auth
573611
safetensors==0.7.0
@@ -622,6 +660,12 @@ statsmodels==0.14.5
622660
# via
623661
# -r requirements.in
624662
# evidently
663+
streamlit==1.52.1
664+
# via
665+
# -r requirements.in
666+
# streamlit-chat
667+
streamlit-chat==0.1.1
668+
# via -r requirements.in
625669
striprtf==0.0.26
626670
# via llama-index-readers-file
627671
sympy==1.14.0
@@ -631,14 +675,19 @@ tenacity==9.1.2
631675
# llama-cloud-services
632676
# llama-index-core
633677
# plotly
678+
# streamlit
634679
threadpoolctl==3.6.0
635680
# via scikit-learn
636681
tiktoken==0.12.0
637682
# via llama-index-core
638683
tokenizers==0.22.1
639684
# via transformers
685+
toml==0.10.2
686+
# via streamlit
640687
torch==2.9.1
641688
# via sentence-transformers
689+
tornado==6.5.2
690+
# via streamlit
642691
tqdm==4.67.1
643692
# via
644693
# -r requirements.in
@@ -661,6 +710,7 @@ typing-extensions==4.15.0
661710
# aiosignal
662711
# aiosqlite
663712
# alembic
713+
# altair
664714
# anyio
665715
# beautifulsoup4
666716
# fastapi
@@ -678,9 +728,11 @@ typing-extensions==4.15.0
678728
# polyfactory
679729
# pydantic
680730
# pydantic-core
731+
# referencing
681732
# sentence-transformers
682733
# sqlalchemy
683734
# starlette
735+
# streamlit
684736
# torch
685737
# typer
686738
# typing-inspect
@@ -700,7 +752,7 @@ tzdata==2025.2
700752
# pandas
701753
ujson==5.11.0
702754
# via evidently
703-
urllib3==2.5.0
755+
urllib3==2.6.0
704756
# via
705757
# docker
706758
# evidently
@@ -717,7 +769,9 @@ uvloop==0.22.1 ; platform_python_implementation != 'PyPy' and sys_platform != 'c
717769
waitress==3.0.2 ; sys_platform == 'win32'
718770
# via mlflow
719771
watchdog==6.0.0
720-
# via evidently
772+
# via
773+
# evidently
774+
# streamlit
721775
watchfiles==1.1.1
722776
# via uvicorn
723777
websockets==15.0.1

0 commit comments

Comments
 (0)