@@ -113,6 +113,7 @@ def create(
113113 timeout : int = 300 ,
114114 idle_timeout : Optional [IdleTimeout ] = None ,
115115 enable_tcp_proxy : bool = False ,
116+ privileged : bool = False ,
116117 ) -> Sandbox :
117118 """
118119 Create a new sandbox instance.
@@ -135,6 +136,7 @@ def create(
135136 - int > 0: Deep sleep only (e.g., 600 for 600s deep sleep)
136137 - dict: Explicit configuration with {"light_sleep": 300, "deep_sleep": 600}
137138 enable_tcp_proxy: If True, enables TCP proxy for direct TCP access to port 3031
139+ privileged: If True, run the container in privileged mode (default: False)
138140
139141 Returns:
140142 Sandbox: A new Sandbox instance
@@ -161,6 +163,7 @@ def create(
161163 timeout = timeout ,
162164 idle_timeout = idle_timeout ,
163165 enable_tcp_proxy = enable_tcp_proxy ,
166+ privileged = privileged ,
164167 )
165168
166169 if wait_ready :
@@ -187,6 +190,7 @@ def _create_sync(
187190 timeout : int = 300 ,
188191 idle_timeout : Optional [IdleTimeout ] = None ,
189192 enable_tcp_proxy : bool = False ,
193+ privileged : bool = False ,
190194 ) -> Sandbox :
191195 """
192196 Synchronous creation method that returns creation parameters.
@@ -215,7 +219,7 @@ def _create_sync(
215219 app_id = app_response .app .id
216220
217221 env_vars = build_env_vars (env )
218- docker_source = create_docker_source (image , [], privileged = True )
222+ docker_source = create_docker_source (image , [], privileged = privileged )
219223 deployment_definition = create_deployment_definition (
220224 name = name ,
221225 docker_source = docker_source ,
@@ -848,6 +852,7 @@ async def create(
848852 timeout : int = 300 ,
849853 idle_timeout : Optional [IdleTimeout ] = None ,
850854 enable_tcp_proxy : bool = False ,
855+ privileged : bool = False ,
851856 ) -> AsyncSandbox :
852857 """
853858 Create a new sandbox instance with async support.
@@ -870,6 +875,7 @@ async def create(
870875 - int > 0: Deep sleep only (e.g., 600 for 600s deep sleep)
871876 - dict: Explicit configuration with {"light_sleep": 300, "deep_sleep": 600}
872877 enable_tcp_proxy: If True, enables TCP proxy for direct TCP access to port 3031
878+ privileged: If True, run the container in privileged mode (default: False)
873879
874880 Returns:
875881 AsyncSandbox: A new AsyncSandbox instance
@@ -899,6 +905,7 @@ async def create(
899905 timeout = timeout ,
900906 idle_timeout = idle_timeout ,
901907 enable_tcp_proxy = enable_tcp_proxy ,
908+ privileged = privileged ,
902909 ),
903910 )
904911
0 commit comments