Spaces:
Sleeping
Sleeping
tyrwh
commited on
Commit
·
489fda7
1
Parent(s):
cdc1556
Dockerfile fixes to work on HF container
Browse files- Dockerfile +2 -2
- app.py +3 -3
Dockerfile
CHANGED
|
@@ -22,8 +22,8 @@ COPY requirements.txt .
|
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
# Create directories for uploads and results, and set permissions
|
| 25 |
-
RUN mkdir -p /app/uploads /app/results && \
|
| 26 |
-
chmod 777 /app/uploads /app/results
|
| 27 |
|
| 28 |
# Copy the rest of the application code into the container at /app
|
| 29 |
# This includes app.py, nemaquant.py, templates/, static/, etc.
|
|
|
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
# Create directories for uploads and results, and set permissions
|
| 25 |
+
RUN mkdir -p /app/uploads /app/results /app/annotated && \
|
| 26 |
+
chmod 777 /app/uploads /app/results /app/annotated
|
| 27 |
|
| 28 |
# Copy the rest of the application code into the container at /app
|
| 29 |
# This includes app.py, nemaquant.py, templates/, static/, etc.
|
app.py
CHANGED
|
@@ -36,9 +36,9 @@ app.config['WEIGHTS_FILE'] = str(WEIGHTS_FILE)
|
|
| 36 |
app.config['ANNOT_FOLDER'] = str(ANNOT_FOLDER)
|
| 37 |
app.config['ALLOWED_EXTENSIONS'] = {'png', 'jpg', 'jpeg', 'tif', 'tiff'}
|
| 38 |
|
| 39 |
-
UPLOAD_FOLDER.mkdir(parents=True, exist_ok=True)
|
| 40 |
-
RESULTS_FOLDER.mkdir(parents=True, exist_ok=True)
|
| 41 |
-
ANNOT_FOLDER.mkdir(parents=True, exist_ok=True)
|
| 42 |
|
| 43 |
async_results = {} # this has to be global I think
|
| 44 |
|
|
|
|
| 36 |
app.config['ANNOT_FOLDER'] = str(ANNOT_FOLDER)
|
| 37 |
app.config['ALLOWED_EXTENSIONS'] = {'png', 'jpg', 'jpeg', 'tif', 'tiff'}
|
| 38 |
|
| 39 |
+
# UPLOAD_FOLDER.mkdir(parents=True, exist_ok=True)
|
| 40 |
+
# RESULTS_FOLDER.mkdir(parents=True, exist_ok=True)
|
| 41 |
+
# ANNOT_FOLDER.mkdir(parents=True, exist_ok=True)
|
| 42 |
|
| 43 |
async_results = {} # this has to be global I think
|
| 44 |
|