Skip to content

fanaanai/fanaan-genai

Repository files navigation

dev enviroments options

1 docker compose for testing client on celery

prerequisites, setup .env file with this default values

RABBITMQ_USER=defaultuser
RABBITMQ_PASS=defaultpass

CELERY_BROKER_URL=amqp://defaultuser:defaultpass@rabbitmq:5672//
CELERY_BACKEND_URL=redis://redis:6379/0

then run

docker compose up --build   # run on root project dir

2 local dev environment, make sure rabbitmq, python 3.10+, redis available locally

create virtual environment

python3 -m venv venv
# or 
python -m venv venv

activate the Virtual Environment

macOS/Linux:

source venv/bin/activate

Windows (Command Prompt):

.\\venv\\Scripts\\activate.bat

Windows (PowerShell):

.\\venv\\Scripts\\Activate.ps1

install requirements

pip install -r requirements.txt

run command for celery + rabbitmq + app server

celery -A celery_app worker -l info; uvicorn main:app

to clean up pycache, make sure to stage ur changes before running the command

find . -name "__pycache__" -type d -exec rm -r {} +

to exit the virtual environment, simply run:

deactivate

the terminal prompt will return to its normal state.

About

fanaan generative ai server

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors