Jelajahi Sumber

Deploy Qwen3-Coder-Next uncensored fine-tuner

Sameric 4 bulan lalu
induk
melakukan
673e5c9bfe
1 mengubah file dengan 7 tambahan dan 3 penghapusan
  1. 7 3
      Dockerfile

+ 7 - 3
Dockerfile

@@ -43,11 +43,15 @@ RUN pip install --no-cache-dir -r requirements.txt
 # Copy app files
 COPY . .
 
-# Create cache directories
-RUN mkdir -p /tmp/hf_cache /tmp/torch_cache /tmp/qwen3-uncensored-lora /tmp/merged_model
-
 # Create non-root user for HF Spaces
 RUN useradd -m -u 1000 user
+
+# Create cache directories and make them owned by the non-root user
+RUN mkdir -p /tmp/hf_cache /tmp/torch_cache /tmp/qwen3-uncensored-lora /tmp/merged_model \
+    && chown -R user:user /tmp/hf_cache /tmp/torch_cache /tmp/qwen3-uncensored-lora /tmp/merged_model \
+    && chmod -R 777 /tmp/hf_cache /tmp/torch_cache /tmp/qwen3-uncensored-lora /tmp/merged_model \
+    && chown -R user:user /app
+
 USER user
 
 ENV HOME=/home/user