@@ -25,6 +25,10 @@ def test_trl(caplog: pytest.LogCaptureFixture, tmp_path: PosixPath) -> None:
2525 tmp_path .mkdir (exist_ok = True )
2626 tmp_path .chmod (0o775 )
2727
28+ # Check that the Docker volume mount can write to the `tmp_path`
29+ with open (tmp_path / "test.txt" , "w" ) as f :
30+ f .write ("Hello, World!" )
31+
2832 logging .info ("Running the container for TRL..." )
2933 container = client .containers .run (
3034 os .getenv (
@@ -56,7 +60,7 @@ def test_trl(caplog: pytest.LogCaptureFixture, tmp_path: PosixPath) -> None:
5660 detach = True ,
5761 # Mount the volume from the `tmp_path` to the `/opt/huggingface/trained_model`
5862 volumes = {
59- f" { tmp_path } /" : {
63+ tmp_path : {
6064 "bind" : "/opt/huggingface/trained_model" ,
6165 "mode" : "rw" ,
6266 }
@@ -91,6 +95,10 @@ def test_trl_peft(caplog: pytest.LogCaptureFixture, tmp_path: PosixPath) -> None
9195 tmp_path .mkdir (exist_ok = True )
9296 tmp_path .chmod (0o775 )
9397
98+ # Check that the Docker volume mount can write to the `tmp_path`
99+ with open (tmp_path / "test.txt" , "w" ) as f :
100+ f .write ("Hello, World!" )
101+
94102 logging .info ("Running the container for TRL..." )
95103 container = client .containers .run (
96104 os .getenv (
@@ -125,7 +133,7 @@ def test_trl_peft(caplog: pytest.LogCaptureFixture, tmp_path: PosixPath) -> None
125133 detach = True ,
126134 # Mount the volume from the `tmp_path` to the `/opt/huggingface/trained_model`
127135 volumes = {
128- f" { tmp_path } /" : {
136+ tmp_path : {
129137 "bind" : "/opt/huggingface/trained_model" ,
130138 "mode" : "rw" ,
131139 }
0 commit comments