Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions cmds.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# capture all library in requirement txt file
pip freeze | cut -d'=' -f1 > requirements_transform.txt
pipdeptree --freeze --warn silence | grep -E '^[a-zA-Z0-9\-_]+' | cut -d'=' -f1 > requirements.txt

# capture library with version number
pipdeptree --freeze --warn silence | grep -E '^[a-zA-Z0-9\-_]+' > requirements.txt

# for windows
pipdeptree --freeze --warn silence | findstr /R "^[a-zA-Z0-9\-_]" > requirements.txt

#execute docker mongodb in container
docker run -d --name mongodb-container -p 27017:27017 mongo

#execute docker mongodb in container with volume
docker compose down all && docker compose -f docker-compose.yml up -d --build

#execute FastAPI server
uvicorn app.main:app --reload

#Kill port in linux if occupied by VSCode
sudo lsof -i :8000
kill -9 <PID>

# to stop mongodb
net stop MongoDB

#docker compose validation
docker-compose config

#If the output doesn't show any errors, your file is valid. Then you can start the services:
docker-compose up --build

#If you want to run the services in the background, you can use the -d flag:
docker compose up -d --build

# -f is used for custom filename for docker compose
docker compose -f docker-compose.yml up -d --build

docker run -it chatbot_backend-fastapi_application /bin/bash

# This is test

# Run the command to fetch the latest references from GitHub
git fetch --prune

# Identify local branches not tracked on GitHub
git branch -vv | grep ': gone' | awk '{print $1}'

# Run the following command to delete all untracked local branches
git branch -vv | grep ': gone' | awk '{print $1}' | xargs -r git branch -d
8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fqdn
isoduration
jsonpointer
jupyter
pipdeptree
tinycss2
uri-template
webcolors
97 changes: 97 additions & 0 deletions requirements_transform.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
anyio
argon2-cffi
argon2-cffi-bindings
arrow
asttokens
async-lru
attrs
babel
beautifulsoup4
bleach
certifi
cffi
charset-normalizer
colorama
comm
debugpy
decorator
defusedxml
executing
fastjsonschema
fqdn
h11
httpcore
httpx
idna
ipykernel
ipython
ipywidgets
isoduration
jedi
Jinja2
json5
jsonpointer
jsonschema
jsonschema-specifications
jupyter
jupyter-console
jupyter-events
jupyter-lsp
jupyter_client
jupyter_core
jupyter_server
jupyter_server_terminals
jupyterlab
jupyterlab_pygments
jupyterlab_server
jupyterlab_widgets
MarkupSafe
matplotlib-inline
mistune
nbclient
nbconvert
nbformat
nest-asyncio
notebook
notebook_shim
overrides
packaging
pandocfilters
parso
platformdirs
prometheus_client
prompt_toolkit
psutil
pure_eval
pycparser
Pygments
python-dateutil
python-json-logger
pywin32
pywinpty
PyYAML
pyzmq
referencing
requests
rfc3339-validator
rfc3986-validator
rpds-py
Send2Trash
setuptools
six
sniffio
soupsieve
stack-data
terminado
tinycss2
tornado
traitlets
types-python-dateutil
typing_extensions
uri-template
urllib3
wcwidth
webcolors
webencodings
websocket-client
widgetsnbextension
Loading