Spaces:
Running
Running
ishworrsubedii
commited on
Commit
•
f74a9b7
1
Parent(s):
cf8d524
update: temp dir path
Browse files- Dockerfile +8 -3
- app.py +1 -2
Dockerfile
CHANGED
@@ -37,10 +37,15 @@ RUN chown -R appuser:appuser /app && \
|
|
37 |
chmod -R 777 /tmp
|
38 |
|
39 |
# Create required directories and set permissions
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
43 |
chmod -R 777 /app/resources/temp_video
|
|
|
44 |
# Configure ImageMagick with a permissive policy
|
45 |
RUN mv /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.bak || true
|
46 |
RUN echo '<policymap>\
|
|
|
37 |
chmod -R 777 /tmp
|
38 |
|
39 |
# Create required directories and set permissions
|
40 |
+
# Create required directories and set permissions
|
41 |
+
RUN mkdir -p /app/resources/audio && \
|
42 |
+
mkdir -p /app/resources/fonts && \
|
43 |
+
mkdir -p /app/resources/intro && \
|
44 |
+
mkdir -p /app/resources/temp_video && \
|
45 |
+
chown -R appuser:appuser /app && \
|
46 |
+
chmod -R 755 /app && \
|
47 |
chmod -R 777 /app/resources/temp_video
|
48 |
+
|
49 |
# Configure ImageMagick with a permissive policy
|
50 |
RUN mv /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.bak || true
|
51 |
RUN echo '<policymap>\
|
app.py
CHANGED
@@ -14,12 +14,11 @@ supabase_key = os.getenv('SUPABASE_KEY')
|
|
14 |
supabase = create_client(supabase_url, supabase_key)
|
15 |
app = FastAPI()
|
16 |
|
17 |
-
RESOURCES_DIR = "/
|
18 |
|
19 |
os.makedirs(RESOURCES_DIR, exist_ok=True)
|
20 |
TEMP_VIDEO_DIR = f"{RESOURCES_DIR}/temp_video"
|
21 |
|
22 |
-
os.makedirs(f"{RESOURCES_DIR}/temp_video", exist_ok=True)
|
23 |
|
24 |
os.environ['MOVIEPY_TEMP_DIR'] = '/tmp/moviepy'
|
25 |
|
|
|
14 |
supabase = create_client(supabase_url, supabase_key)
|
15 |
app = FastAPI()
|
16 |
|
17 |
+
RESOURCES_DIR = "/app/resources"
|
18 |
|
19 |
os.makedirs(RESOURCES_DIR, exist_ok=True)
|
20 |
TEMP_VIDEO_DIR = f"{RESOURCES_DIR}/temp_video"
|
21 |
|
|
|
22 |
|
23 |
os.environ['MOVIEPY_TEMP_DIR'] = '/tmp/moviepy'
|
24 |
|