Skip to content

Commit

Permalink
.env file to .env.example
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkersigirci committed Nov 20, 2024
1 parent b9ed370 commit 41afb4b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .env → .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DEPLOYED_PYTHON_VERSION=3.11
LIBRARY_BASE_PATH=/workspace/runpod-playground
HF_HOME=/workspace/runpod-playground/huggingface
LIBRARY_BASE_PATH=DUMMY_PATH
HF_HOME=DUMMY_PATH/huggingface
HF_HUB_ENABLE_HF_TRANSFER=1
# HF_TOKEN=TO_BE_FILLED
# RUNPOD_API_KEY=TO_BE_FILLED
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,4 @@ cython_debug/
models
huggingface
*.txt
.env.local
.env
20 changes: 14 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ python-info: ## List information about the python environment
@which ${PYTHON}
@${PYTHON} --version

install-uv:
! command -v uv &> /dev/null && curl -LsSf https://astral.sh/uv/install.sh | sh
# echo '. "$$HOME/.local/bin/env"' >> ~/.bashrc
change-paths-in-env-file: ## Change the path in the .env file with the current working directory
@CWD=$$(pwd)
sed -i "s|DUMMY_PATH|$$CWD|g" .env

install-package: ## Installs the development version of the package
$(MAKE) install-uv
uv sync --frozen
prepare-env-file: ## Copy .env.example to .env and correct the paths
cp .env.example .env
$(MAKE) change-paths-in-env-file

change-model-env: ## Change the model that is specified in the .env file
# sed -i 's/HF_MODEL_NAME=alpindale\/WizardLM-2-8x22B/HF_MODEL_NAME=CohereForAI\/c4ai-command-r-v01/g' .env
Expand All @@ -42,6 +42,14 @@ change-max-context-len-env: ## Change the max context length that is specified i
sed -i '/MAX_CONTEXT_LEN=/d' .env
echo "MAX_CONTEXT_LEN=${MAX_CONTEXT_LEN}" >> .env

install-uv:
! command -v uv &> /dev/null && curl -LsSf https://astral.sh/uv/install.sh | sh
# echo '. "$$HOME/.local/bin/env"' >> ~/.bashrc

install-package: ## Installs the development version of the package
$(MAKE) install-uv
uv sync --frozen

initial-runpod-install: ## Install necessary tools and packages for Runpod, also install project dependencies
nohup bash ${LIBRARY_BASE_PATH}/scripts/initial_install.sh > initial_runpod_install_$(shell date +%Y%m%d_%H%M%S).txt 2>&1 &

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ cd /workspace
git clone https://github.com/ilkersigirci/runpod-playground.git
cd /workspace/runpod-playground

# Prepare .env file
make prepare-env-file

# Initial dependency install
make initial-runpod-install

Expand Down

0 comments on commit 41afb4b

Please sign in to comment.