blasisd commited on
Commit
dc4e557
·
1 Parent(s): eb6e853

Updated README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -4
README.md CHANGED
@@ -55,16 +55,28 @@ To set up and run this project, ensure the following software and tools are inst
55
  pip install -r requirements.txt
56
  ```
57
 
 
 
 
 
 
 
58
  ### Local Development and Testing
59
 
60
  To run the application locally for development and testing purposes, execute the following command in your terminal:
61
 
62
  ```bash
63
- python app.py
 
 
 
 
 
 
64
  ```
65
 
66
  > [!WARNING]
67
- > Ensure you are in the project's **src** directory before running the script or adapt running path.
68
 
69
  ## Deployment
70
 
@@ -78,11 +90,25 @@ To deploy the project on Hugging Face Spaces, follow these steps:
78
 
79
  ### Docker-based Deployment
80
 
81
- For Docker-based Deployment:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
  1. Follow the official [Docker Spaces Guide](https://huggingface.co/docs/hub/en/spaces-sdks-docker-first-demo) for container setup.
84
  2. Copy the available `Dockerfile` to your repository root or create your own.
85
- 3. Configure settings requirements in `README.md` metadata (especially app_port):
86
 
87
  ```yaml
88
  ---
 
55
  pip install -r requirements.txt
56
  ```
57
 
58
+ - **Docker (Optional)**: For containerized deployment. Install from [Docker's official site](https://docs.docker.com/get-docker/) and verify with:
59
+
60
+ ```bash
61
+ docker --version
62
+ ```
63
+
64
  ### Local Development and Testing
65
 
66
  To run the application locally for development and testing purposes, execute the following command in your terminal:
67
 
68
  ```bash
69
+ uvicorn main:app --host 0.0.0.0 --port 7860 --reload
70
+ ```
71
+
72
+ If it does not work, just try:
73
+
74
+ ```bash
75
+ python -m uvicorn main:app --host 0.0.0.0 --port 7860 --reload
76
  ```
77
 
78
  > [!WARNING]
79
+ > Ensure you are in the project's **src** directory before running the script or adapt running path (i.e. `python -m uvicorn src.main:app --host 0.0.0.0 --port 7860 --reload`).
80
 
81
  ## Deployment
82
 
 
90
 
91
  ### Docker-based Deployment
92
 
93
+ #### Locally
94
+
95
+ - Build your docker image:
96
+
97
+ ```bash
98
+ docker build -t musheff-api .
99
+ ```
100
+
101
+ - Run a container based on the image:
102
+
103
+ ```bash
104
+ docker run -it -p 7860:7860 musheff-api
105
+ ```
106
+
107
+ #### On Hugging Face
108
 
109
  1. Follow the official [Docker Spaces Guide](https://huggingface.co/docs/hub/en/spaces-sdks-docker-first-demo) for container setup.
110
  2. Copy the available `Dockerfile` to your repository root or create your own.
111
+ 3. Configure settings requirements in `README.md` metadata (especially app_port if you need a different port to use):
112
 
113
  ```yaml
114
  ---