lighter python and a debug
Browse files- App/Worker.py +2 -1
- Dockerfile +1 -1
App/Worker.py
CHANGED
@@ -33,7 +33,7 @@ def create_json_file(assets: List[Assets], asset_dir: str):
|
|
33 |
|
34 |
# Create directory if it doesn't exist
|
35 |
os.makedirs(asset_dir, exist_ok=True)
|
36 |
-
|
37 |
# Write JSON string to file
|
38 |
with open(os.path.join(asset_dir, filename), "w") as f:
|
39 |
f.write(json_string)
|
@@ -101,6 +101,7 @@ def celery_task(video_task: EditorRequest):
|
|
101 |
project_id = str(uuid.uuid4())
|
102 |
temp_dir = f"/tmp/{project_id}"
|
103 |
output_dir = f"/tmp/{project_id}/out/video.mp4"
|
|
|
104 |
assets_dir = os.path.join(temp_dir, "src/HelloWorld/Assets")
|
105 |
|
106 |
chain(
|
|
|
33 |
|
34 |
# Create directory if it doesn't exist
|
35 |
os.makedirs(asset_dir, exist_ok=True)
|
36 |
+
print(os.path.join(asset_dir, filename))
|
37 |
# Write JSON string to file
|
38 |
with open(os.path.join(asset_dir, filename), "w") as f:
|
39 |
f.write(json_string)
|
|
|
101 |
project_id = str(uuid.uuid4())
|
102 |
temp_dir = f"/tmp/{project_id}"
|
103 |
output_dir = f"/tmp/{project_id}/out/video.mp4"
|
104 |
+
|
105 |
assets_dir = os.path.join(temp_dir, "src/HelloWorld/Assets")
|
106 |
|
107 |
chain(
|
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# Builder stage
|
2 |
-
FROM python:3.10.0 as builder
|
3 |
|
4 |
RUN useradd -ms /bin/bash admin
|
5 |
|
|
|
1 |
# Builder stage
|
2 |
+
FROM python:3.10.0-alpine as builder
|
3 |
|
4 |
RUN useradd -ms /bin/bash admin
|
5 |
|