diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..7822762 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,42 @@ +FROM continuumio/miniconda3:latest + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + git \ + curl \ + sudo \ + && rm -rf /var/lib/apt/lists/* + +# Create a non-root user with sudo privileges +ARG USERNAME=llm_engineer +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +# Create the user +RUN groupadd --gid $USER_GID $USERNAME \ + && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ + && chmod 0440 /etc/sudoers.d/$USERNAME + +# Explicitly set bash as the default shell for the new user +RUN chsh -s /bin/bash $USERNAME + +# Copy and create the custom environment +COPY environment.yml /tmp/environment.yml +RUN conda env create -f /tmp/environment.yml + +# Set up conda for the new user +USER $USERNAME +RUN conda init bash + +# Make sure the new user owns their home directory and has access to conda +USER root +RUN chown -R $USERNAME:$USERNAME /home/$USERNAME \ + && chown -R $USERNAME:$USERNAME /opt/conda/envs/codespace + +# Switch back to the non-root user +USER $USERNAME +WORKDIR /home/$USERNAME + +# Set the default shell to bash +SHELL ["/bin/bash", "-c"] diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..ae4cf49 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +{ + "name": "Python Environment", + "build": { + "dockerfile": "Dockerfile", + "args": { + "USERNAME": "llm_engineer" + } + }, + "remoteUser": "llm_engineer", + "features": {}, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-toolsai.jupyter" + ], + "settings": { + "python.defaultInterpreterPath": "/opt/conda/envs/llm_engineer/bin/python", + "python.linting.enabled": true + } + } + }, + "forwardPorts": [], + "postCreateCommand": "conda init bash && echo 'conda activate llm_engineer' >> ~/.bashrc" +} diff --git a/.devcontainer/environment.yml b/.devcontainer/environment.yml new file mode 100644 index 0000000..1476201 --- /dev/null +++ b/.devcontainer/environment.yml @@ -0,0 +1,50 @@ +name: llm_engineer +channels: + - conda-forge + - defaults +dependencies: + - python=3.11 + - pip + - python-dotenv + - requests + - numpy + - pandas + - scipy + - pytorch + - jupyterlab + - ipywidgets + - matplotlib + - scikit-learn + - chromadb + - jupyter-dash + - sentencepiece + - pyarrow + - faiss-cpu + - pip: + - beautifulsoup4 + - plotly + - bitsandbytes + - transformers + - sentence-transformers + - datasets + - accelerate + - openai + - anthropic + - google-generativeai + - gradio + - gensim + - modal + - ollama + - psutil + - setuptools + - speedtest-cli + - langchain + - langchain-core + - langchain-text-splitters + - langchain-openai + - langchain-chroma + - langchain-community + - faiss-cpu + - feedparser + - twilio + - pydub