Skip to content

Commit a3af96c

Browse files
Update conda create command's flags
1 parent 63330a8 commit a3af96c

File tree

3 files changed

+10
-41
lines changed

3 files changed

+10
-41
lines changed

backend/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async def root():
141141
# Create a simple config with log_config=None to disable Uvicorn's default logging
142142
config = Config(
143143
app=app,
144-
host="0.0.0.0",
144+
host="localhost",
145145
port=52123,
146146
log_level="info",
147147
log_config=None, # This is crucial - disable Uvicorn's default logging config

docs/Manual_Setup_Guide.md

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ git remote add upstream https://github.com/AOSSIE-Org/PictoPy
3131
Before setting up the Python backend and sync-microservice, you need to have **Miniconda** installed and set up on your system.
3232

3333
1. **Download and Install Miniconda:**
34+
3435
- Visit the [Miniconda installation guide](https://www.anaconda.com/docs/getting-started/miniconda/install#quickstart-install-instructions)
3536
- Follow the quickstart install instructions for your operating system
3637
- Make sure `conda` is available in your terminal after installation
@@ -75,7 +76,7 @@ Before setting up the Python backend and sync-microservice, you need to have **M
7576
Bash/Powershell
7677
7778
```
78-
conda create -n .env python=3.12
79+
conda create -p .env python=3.12
7980
```
8081
8182
3. **Activate the Conda Environment:**
@@ -86,31 +87,15 @@ Before setting up the Python backend and sync-microservice, you need to have **M
8687
conda activate ./.env
8788
```
8889
89-
4. **Update PATH (Important):** Ensure the conda environment's binaries are prioritized:
90-
91-
Bash (Linux/MacOS)
92-
93-
```
94-
export PATH="$CONDA_PREFIX/bin:$PATH"
95-
```
96-
97-
Powershell (Windows)
98-
99-
```
100-
$env:PATH = "$env:CONDA_PREFIX\Scripts;$env:PATH"
101-
```
102-
103-
After activating, you should be able to see the conda environment's name before the current path.
104-
105-
5. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:
90+
4. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:
10691
10792
Bash/Powershell
10893
10994
```
11095
pip install -r requirements.txt
11196
```
11297
113-
6. **Running the backend:**: To start the backend in development mode, run this command while being in the backend folder and the conda environment activated:
98+
5. **Running the backend:**: To start the backend in development mode, run this command while being in the backend folder and the conda environment activated:
11499
115100
Bash/Powershell
116101
@@ -139,7 +124,7 @@ Before setting up the Python backend and sync-microservice, you need to have **M
139124
Bash/Powershell
140125
141126
```
142-
conda create -n .sync-env python=3.12
127+
conda create -p .sync-env python=3.12
143128
```
144129
145130
3. **Activate the Conda Environment:**
@@ -150,31 +135,15 @@ Before setting up the Python backend and sync-microservice, you need to have **M
150135
conda activate ./.sync-env
151136
```
152137
153-
4. **Update PATH (Important):** Ensure the conda environment's binaries are prioritized:
154-
155-
Bash (Linux/MacOS)
156-
157-
```
158-
export PATH="$CONDA_PREFIX/bin:$PATH"
159-
```
160-
161-
Powershell (Windows)
162-
163-
```
164-
$env:PATH = "$env:CONDA_PREFIX\Scripts;$env:PATH"
165-
```
166-
167-
After activating, you should be able to see the conda environment's name before the current path.
168-
169-
5. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:
138+
4. **Install Dependencies:** The `requirements.txt` file lists required packages. Install them using pip:
170139
171140
Bash/Powershell
172141
173142
```
174143
pip install -r requirements.txt
175144
```
176145
177-
6. **Running the sync-microservice:** To start the sync-microservice in development mode, run this command while being in the sync-microservice folder and the conda environment activated:
146+
5. **Running the sync-microservice:** To start the sync-microservice in development mode, run this command while being in the sync-microservice folder and the conda environment activated:
178147
179148
Bash/Powershell
180149

sync-microservice/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@
4242
app.include_router(folders.router, prefix="/folders", tags=["Folders"])
4343

4444
if __name__ == "__main__":
45-
logger.info("Starting PictoPy Sync Microservice from main...")
45+
logger.info("Starting PictoPy Sync Microservice")
4646

4747
# Create config with log_config=None to disable Uvicorn's default logging
4848
config = Config(
4949
app=app,
50-
host="0.0.0.0",
50+
host="localhost",
5151
port=52124,
5252
log_level="info",
5353
log_config=None, # Disable uvicorn's default logging config

0 commit comments

Comments
 (0)