Spaces:
Runtime error
Runtime error
Commit
·
fbf063e
1
Parent(s):
6a78509
docker permission update
Browse files- Dockerfile +7 -0
- app/settings.py +2 -2
Dockerfile
CHANGED
@@ -7,6 +7,13 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
7 |
|
8 |
COPY app/ app/
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
VOLUME /app/vector_store
|
11 |
VOLUME /app/uploads
|
12 |
VOLUME /app/log_dir
|
|
|
7 |
|
8 |
COPY app/ app/
|
9 |
|
10 |
+
RUN mkdir -p app/vector_store && chmod -R 777 app/vector_store
|
11 |
+
RUN mkdir -p app/uploads && chmod -R 777 app/uploads
|
12 |
+
RUN mkdir -p app/log_dir && chmod -R 777 app/log_dir
|
13 |
+
RUN mkdir -p app/models && chmod -R 777 app/models
|
14 |
+
|
15 |
+
USER appuser
|
16 |
+
|
17 |
VOLUME /app/vector_store
|
18 |
VOLUME /app/uploads
|
19 |
VOLUME /app/log_dir
|
app/settings.py
CHANGED
@@ -16,10 +16,10 @@ class Config:
|
|
16 |
os.makedirs(PERSIST_DIRECTORY, exist_ok=True)
|
17 |
|
18 |
UPLOAD_DIR = os.path.join(os.path.dirname(__file__),'uploads')
|
19 |
-
|
20 |
|
21 |
LOG_DIR = os.path.join(os.path.dirname(__file__),'log_dir')
|
22 |
-
|
23 |
|
24 |
MODELS_PATH = os.path.join(os.path.dirname(__file__),'models')
|
25 |
|
|
|
16 |
os.makedirs(PERSIST_DIRECTORY, exist_ok=True)
|
17 |
|
18 |
UPLOAD_DIR = os.path.join(os.path.dirname(__file__),'uploads')
|
19 |
+
os.makedirs(UPLOAD_DIR, exist_ok=True)
|
20 |
|
21 |
LOG_DIR = os.path.join(os.path.dirname(__file__),'log_dir')
|
22 |
+
os.makedirs(LOG_DIR, exist_ok=True)
|
23 |
|
24 |
MODELS_PATH = os.path.join(os.path.dirname(__file__),'models')
|
25 |
|