Standalone - using Python virtual environment
Cheminformatics Microservice can also be deployed as a standalone application using the Python virtual environment. Here are the step by step instructions.
Install Python: Install Python on your machine by following the instructions for your specific operating system.
Open a terminal or command prompt.
Navigate to the directory where your CM project codebase is located: Use
cdto navigate to the project directory.
Create a virtual environment (optional but recommended): Run the command
python -m venv envto create a new virtual environment named "env" for your app.
Activate the virtual environment (if created): Depending on your operating system, run the appropriate command to activate the virtual environment. For example, on Windows, run
.\env\Scripts\activate, and on macOS/Linux, run
Install FastAPI and required dependencies: Run the command
pip install -r requirements.txtto install FastAPI and the necessary dependencies.
Run the FastAPI app: Execute the command
uvicorn main:app --reloadto start the CM app.
Wait for the app to start: Uvicorn will start the app and display the server address (usually
http://localhost:8000) in the terminal or command prompt.
Access the FastAPI app: Open a web browser and navigate to the server address displayed in the terminal or command prompt. You should see your FastAPI app running.