GitHub Actions commited on
Commit
170ef84
·
1 Parent(s): bcd2be9

deploy: sync from GitHub 595cad516f78b5793465f926fc7335758daa8f23

Browse files
Files changed (2) hide show
  1. README.md +12 -6
  2. app.py +4 -4
README.md CHANGED
@@ -108,13 +108,23 @@ Process 500 images for:
108
  ### Docker Deployment
109
 
110
  1. **Build the Container**:
 
 
 
111
  ```bash
112
- docker build -t nemaquant-flask .
 
 
 
 
 
 
113
  ```
114
 
115
  2. **Run the Container**:
 
116
  ```bash
117
- docker run -p 7860:7860 -v $(pwd)/results:/app/results nemaquant-flask
118
  ```
119
 
120
  ### Hugging Face Spaces Deployment
@@ -191,7 +201,3 @@ Process 500 images for:
191
  - Time of day (free tier performance varies with overall platform usage)
192
 
193
  For most users, the free tier is sufficient for small to medium batches (< 200 images), while the CPU upgrade offers a good balance of cost and performance for larger datasets. GPU options are recommended only for time-sensitive processing of large batches or when processing thousands of images.
194
-
195
- ## License
196
-
197
- [Specify your license here]
 
108
  ### Docker Deployment
109
 
110
  1. **Build the Container**:
111
+
112
+ - For only CPU usage:
113
+
114
  ```bash
115
+ docker pull breedinginsight/nemaquant
116
+ ```
117
+
118
+ - For GPU usage:
119
+
120
+ ```bash
121
+ docker pull breedinginsight/nemaquant:latest-gpu
122
  ```
123
 
124
  2. **Run the Container**:
125
+
126
  ```bash
127
+ docker run -p 7860:7860 -v $(pwd)/results:/app/results breedinginsight/nemaquant
128
  ```
129
 
130
  ### Hugging Face Spaces Deployment
 
201
  - Time of day (free tier performance varies with overall platform usage)
202
 
203
  For most users, the free tier is sufficient for small to medium batches (< 200 images), while the CPU upgrade offers a good balance of cost and performance for larger datasets. GPU options are recommended only for time-sensitive processing of large batches or when processing thousands of images.
 
 
 
 
app.py CHANGED
@@ -43,10 +43,10 @@ app.config['ANNOT_FOLDER'] = str(ANNOT_FOLDER)
43
  app.config['WEIGHTS_FILE'] = str(WEIGHTS_FILE)
44
  app.config['ALLOWED_EXTENSIONS'] = {'png', 'jpg', 'jpeg', 'tif', 'tiff'}
45
 
46
- # skip these -- created dirs in dockerfile
47
- # UPLOAD_FOLDER.mkdir(parents=True, exist_ok=True)
48
- # RESULTS_FOLDER.mkdir(parents=True, exist_ok=True)
49
- # ANNOT_FOLDER.mkdir(parents=True, exist_ok=True)
50
 
51
  # Load model once at startup, use CUDA if available
52
  MODEL_DEVICE = 'cuda' if cuda.is_available() else 'cpu'
 
43
  app.config['WEIGHTS_FILE'] = str(WEIGHTS_FILE)
44
  app.config['ALLOWED_EXTENSIONS'] = {'png', 'jpg', 'jpeg', 'tif', 'tiff'}
45
 
46
+ # Create dirs at startup in case the container filesystem overlays the image build dirs
47
+ UPLOAD_FOLDER.mkdir(parents=True, exist_ok=True)
48
+ RESULTS_FOLDER.mkdir(parents=True, exist_ok=True)
49
+ ANNOT_FOLDER.mkdir(parents=True, exist_ok=True)
50
 
51
  # Load model once at startup, use CUDA if available
52
  MODEL_DEVICE = 'cuda' if cuda.is_available() else 'cpu'