Spaces:
Build error
Build error
Commit History
-
Create dockerfile
Verified signaturefrom huggingface_hub import HfApi from pathlib import Path # --- Configuration --- # Your Hugging Face username hf_username = "your-hf-username" # The name of the repository repo_name = "deepseek-chatbot" # The local path to your Dockerfile local_dockerfile_path = "Dockerfile" # The path where the file should be in the repository repo_dockerfile_path = "Dockerfile" # Your Hugging Face API token (replace with your actual token) hf_token = "your-hf-token" # --- Script --- api = HfApi() repo_id = f"{hf_username}/{repo_name}" # Read the content of the Dockerfile dockerfile_content = Path(local_dockerfile_path).read_text() # Commit the Dockerfile to the repository try: api.upload_file( path_or_fileobj=dockerfile_content.encode("utf-8"), path_in_repo=repo_dockerfile_path, repo_id=repo_id, token=hf_token, commit_message="Add Dockerfile for GPU support", ) print(f"File '{repo_dockerfile_path}' committed to repository '{repo_id}'.") except…6c6d5da