Skip to content

Commit

Permalink
fix install
Browse files Browse the repository at this point in the history
  • Loading branch information
Explorergt92 committed Dec 31, 2023
1 parent 009a2db commit 0ee9a20
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ WORKDIR /workspace
RUN conda init

# Create a new Conda environment named eAI with Python 3.12
RUN conda create -n eAI -c conda-forge python=3.12 -y
RUN conda create -n gpt_all -c conda-forge python=3.12 -y

# Initialize conda for shell interaction and set conda to automatically activate the base environment
RUN conda init bash \
&& echo "conda activate eAI" >> ~/.bashrc
&& echo "conda activate gpt_all" >> ~/.bashrc

# Copy the requirements.txt file into the container at /workspace
COPY requirements.txt /workspace/

# Install the Python requirements in the eAI environment
RUN conda run -n eAI pip install --no-cache-dir -r requirements.txt
RUN conda run -n gpt_all pip install --no-cache-dir -r requirements.txt

# Download the SpaCy NLP model in the eAI environment
RUN conda run -n eAI python -m spacy download en_core_web_sm
RUN conda run -n gpt_all python -m spacy download en_core_web_sm

# Set the default environment to eAI when starting the container
# This will activate the eAI environment for any interactive or non-interactive shell
ENV CONDA_DEFAULT_ENV=eAI
ENV CONDA_PREFIX=/opt/conda/envs/eAI
ENV CONDA_DEFAULT_ENV=gpt_all
ENV CONDA_PREFIX=/opt/conda/envs/gpt_all
ENV PATH=$CONDA_PREFIX/bin:$PATH

# Ensure that the conda environment is activated on startup
ENTRYPOINT ["conda", "run", "-n", "eAI", "/bin/bash"]
ENTRYPOINT ["conda", "run", "-n", "gpt_all", "/bin/bash"]
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/miniconda
{
"name": "(eAI_v_0.0.1)",
"name": "(GPT_ALL)",
"build": {
"context": "..",
"dockerfile": "Dockerfile"
Expand Down
4 changes: 2 additions & 2 deletions install.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@echo off

echo Creating a new Conda environment...
call conda create -n eAI -c conda-forge python=3.12 -y
call conda create -n gpt_all -c conda-forge python=3.12 -y

echo Activating the new Conda environment...
call conda activate eAI
call conda activate gpt_all

echo Installing the Python requirements...
call pip install -r requirements.txt
Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

echo "Creating a new Conda environment..."
conda create -n eAI -c conda-forge python=3.12 -y
conda create -n gpt_all -c conda-forge python=3.12 -y

echo "Activating the new Conda environment..."
conda activate eAI
conda activate gpt_all

echo "Installing the Python requirements..."
pip install -r requirements.txt
Expand Down

0 comments on commit 0ee9a20

Please sign in to comment.