Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rossop/kaggle-setup
This repository contains a Bash script designed to streamline the setup of Kaggle competition environments. It automates the creation of a project directory, setting up a Python virtual environment, installing dependencies, initialising a Git repository, and preparing Docker for Kaggle Python projects.
https://github.com/rossop/kaggle-setup
kaggle template
Last synced: 6 days ago
JSON representation
This repository contains a Bash script designed to streamline the setup of Kaggle competition environments. It automates the creation of a project directory, setting up a Python virtual environment, installing dependencies, initialising a Git repository, and preparing Docker for Kaggle Python projects.
- Host: GitHub
- URL: https://github.com/rossop/kaggle-setup
- Owner: rossop
- Created: 2024-03-15T02:50:05.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-03-15T03:16:56.000Z (9 months ago)
- Last Synced: 2024-10-15T02:14:48.963Z (2 months ago)
- Topics: kaggle, template
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kaggle Environment Setup Script
This repository contains a Bash script designed to streamline the setup of Kaggle competition environments. It automates the creation of a project directory, setting up a Python virtual environment, installing dependencies, initializing a Git repository, and preparing Docker for Kaggle Python projects.## Features
- Project Structure Creation: Automatically generates a directory structure for Kaggle projects.
- Virtual Environment: Sets up a Python virtual environment and installs necessary libraries from requirements.txt.
- Git Initialization: Initializes a Git repository and makes the first commit.
- Docker Integration: Creates a Dockerfile pulling the official Kaggle Python image and sets up your project within a Docker container.
- Kaggle API Setup: Copies your kaggle.json to the project root for easy access to Kaggle APIs.## Prerequisites
Before running the script, ensure you have the following installed:
- Git
- Python 3.8 or newer
- Docker (optional)
- The Kaggle CLI (pip install kaggle)## Getting Started
1. Clone the Repository: Clone this repository to your local machine using git clone .
2. Place Your Kaggle API Key: Ensure your kaggle.json file (containing your Kaggle API credentials) is in the same directory as the setup script.
3. Run the Script: Navigate to the repository directory and run the setup script with your desired project name:
```bash
Copy code
./setup-kaggle.sh my_kaggle_project
```
4. Docker Usage: After running the script, use the following command to work with your project in a Docker container:
```bash
Copy code
docker run -it --rm -p 8888:8888 -v "$PWD/my_kaggle_project":/home/cq kaggle_project_image
```
Adjust the port mappings and volume as needed for your project.## Security Note
- Kaggle API Key: Your kaggle.json contains sensitive information. The script copies this file to the project directory but ensures it is listed in .gitignore to prevent it from being pushed to any repository.
## Customization
- Requirements File: The script uses requirements.txt for Python dependencies. Modify this file before running the script if you have specific libraries you need installed.
- Dockerfile: If additional modifications are needed for the Docker environment, you can adjust the Dockerfile generated by the script.
## Contribution
- Contributions to this script are welcome. Please fork the repository, make your changes, and submit a pull request.
## License
- This project is licensed under the MIT License. See the LICENSE file for details.This README.md provides a clear, step-by-step guide for using your setup script, ensuring that users can quickly get started with Kaggle competitions in a reproducible environment. Adjust the content as necessary to fit the specifics of your script and repository.