Files
dataset-uploader/.devcontainer/DevContainer.md

82 lines
2.2 KiB
Markdown

# DevContainer Setup Guide
Quick guide to open and work with the devcontainer in VS Code or PyCharm.
## Prerequisites
- **Docker Desktop** installed and running
- **VS Code** with "Dev Containers" extension, OR **PyCharm Professional**
## Opening in VS Code
### Method 1: Automatic (Recommended)
1. Open the project folder in VS Code:
```bash
code /home/user/Documents/Cleverthis/datasets
```
2. Click the notification: **"Reopen in Container"**
3. Wait for build to complete (first time: 6-10 minutes)
### Method 2: Command Palette
1. Press `F1` (or `Ctrl+Shift+P`)
2. Type: `Dev Containers: Reopen in Container`
3. Wait for build to complete
## Opening in PyCharm Professional
> **Note:** Requires PyCharm Professional (not Community Edition)
1. Open the project: `File → Open → Select datasets folder`
2. If prompted, choose to use DevContainer configuration
3. Manual method (if needed):
- `Tools → Dev Containers → Reopen in Container`
- Or right-click `.devcontainer/devcontainer.json` → "Reopen in Container"
4. Wait for build to complete (first time: 6-10 minutes)
## Verify You're in the Container
**VS Code:**
- Bottom-left status bar shows: `Dev Container: CleverDatasets...`
**PyCharm:**
- Bottom-right shows container connection status
- Python interpreter shows container path
**Terminal:**
```bash
python --version # Should show Python 3.13.x
pwd # Should show /workspaces/datasets
```
## Troubleshooting
**Container won't start:**
- Check Docker is running: `docker ps`
- Check Docker has enough resources (4+ CPU, 8GB+ RAM)
**Build takes too long:**
- First build takes 6-10 minutes (normal)
- If stuck >15 minutes, cancel and rebuild
- Check internet connection (features download from GitHub)
**Extensions not installing:**
- VS Code: Check Extensions panel for errors
- PyCharm: Check `File → Settings → Plugins`
**Python interpreter not found:**
- VS Code: `F1` → `Python: Select Interpreter` → Choose container's Python
- PyCharm: `File → Settings → Project → Python Interpreter` (should auto-detect)
**View detailed logs:**
- VS Code: Click "Dev Contai..." in status bar → "Show Log"
- PyCharm: Check Docker logs: `docker logs <container-name>`