Skip to content

Commit 080372c

Browse files
committed
Fix permission errors on the /tmp volume
1 parent e0b8a57 commit 080372c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

backend/pycon/tasks.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import time
23
import logging
34
import boto3
@@ -39,6 +40,9 @@ def launch_heavy_processing_worker():
3940
if len(response["taskArns"]) > 0:
4041
return
4142

43+
user_id = os.getuid()
44+
group_id = os.getgroups()[0]
45+
4246
response = ecs_client.run_task(
4347
cluster=cluster_name,
4448
taskDefinition=f"pythonit-{settings.ENVIRONMENT}-heavy-processing-worker",
@@ -59,6 +63,11 @@ def launch_heavy_processing_worker():
5963
"roleArn": settings.ECS_SERVICE_ROLE,
6064
"iops": 16_000,
6165
"throughput": 1_000,
66+
"dockerVolumeConfiguration": {
67+
"driverOpts": {
68+
"o": f"uid={user_id},gid={group_id}",
69+
},
70+
},
6271
},
6372
}
6473
],

0 commit comments

Comments
 (0)