@@ -27,14 +27,40 @@ Welcome! This guide explains how to develop and deploy the SGLang Worker for Run
2727git clone < repo-url>
2828cd worker-sglang
2929
30+ # Create .env file for Hugging Face token (required for gated models)
31+ echo " HF_TOKEN=your_huggingface_token_here" > .env
32+
3033# Build locally for testing (optional - will be built in CI)
3134docker build --platform linux/amd64 -t worker-sglang-local .
3235
33- # Test with docker-compose
36+ # Test with docker-compose (will automatically use .env file)
3437docker-compose up
3538```
3639
37- ### 3. Making Changes
40+ ### 3. Environment Configuration
41+
42+ The project uses a ` .env ` file for local development. Docker Compose automatically reads this file.
43+
44+ ** Required for local testing:**
45+
46+ ``` bash
47+ # .env file (create in project root)
48+ HF_TOKEN=your_huggingface_token_here
49+ ```
50+
51+ ** Getting your HF_TOKEN:**
52+
53+ 1 . Go to [ Hugging Face Settings] ( https://huggingface.co/settings/tokens )
54+ 2 . Create a new token with "Read" permissions
55+ 3 . Copy the token to your ` .env ` file
56+
57+ ** ⚠️ Security Note:**
58+
59+ - Never commit the ` .env ` file to git
60+ - The ` .env ` file is already in ` .gitignore `
61+ - Use environment variables in production/CI
62+
63+ ### 4. Making Changes
3864
39651 . ** Create feature branch:**
4066
@@ -44,7 +70,7 @@ docker-compose up
4470
45712 . ** Make your changes** to:
4672
47- - Core files in ` .runpod/ ` directory
73+ - Core files in project root
4874 - Configuration files
4975 - Documentation
5076
@@ -54,8 +80,11 @@ docker-compose up
5480 # Test Docker build
5581 docker build --platform linux/amd64 -t test-build .
5682
57- # Test with sample input
83+ # Test with sample input (ensure .env file exists first)
5884 docker run --rm test-build python3 -c " import handler; print('Import successful')"
85+
86+ # Test with docker-compose (uses .env automatically)
87+ docker-compose up
5988 ```
6089
61904 . ** Commit following conventions:**
0 commit comments