Skip to content

Commit

Permalink
make some tweaks to the workspace to save our python version. Also st…
Browse files Browse the repository at this point in the history
…art on our week1 shared example
  • Loading branch information
gsingers committed Dec 24, 2021
1 parent 972c32c commit 038d145
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The following things must be done each time you create a new Gitpod Workspace (u

1. Fork this repository.
1. Launch a new Gitpod workspace based on this repository. This will automatically start OpenSearch and OpenSearch Dashboards
1. Install (create/copy) your Kaggle API token in `~/.kaggle/kaggle.json`
1. Install (create/copy) your Kaggle API token in `~/.kaggle/kaggle.json` (which is actually in `/workspace/kaggle/kaggle.json` so it is persisted.)
1. Run the download data script:

./download-data.sh
Expand All @@ -60,7 +60,7 @@ The following things must be done each time you create a new Gitpod Workspace (u
At the command line, do the following steps to run the example. For purposes of demonstration, let's assume we are working on week 2. Substitute accordingly for the week you are working on.

1. Setup your Python Virtual Environment. We use `pyenv` (Pyenv website)[https://github.com/pyenv/pyenv] and `pyenv-virtualenv` (Pyenv Virtualenv)[https://github.com/pyenv/pyenv-virtualenv], but you can use whatever you are most comfortable with.
1. `pyenv install 3.9.7` -- Install Python 3.9.7 into PyEnv
1. `pyenv install 3.9.7` -- Install Python 3.9.7 into PyEnv if it isn't installed already. (if you are running in Gitpod, this should already be installed.)
1. `pyenv virtualenv 3.9.7 search_with_ml_week2` -- Create a Virtualenv using that 3.9.7 install
1. `pyenv activate search_with_ml_week2` -- Activate that Virtualenv.
1. Install the Python dependencies: `pip install -r requirements_week2.txt`
Expand Down
3 changes: 2 additions & 1 deletion gitpod-command.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

ln -s /workspace/kaggle /home/gitpod/.kaggle
ln -s /workspace/pyenv/versions/3.9.7/ 3.9.7
mkdir -p /workspace/opensearch
mkdir -p /workspace/logstash
mkdir -p /workspace/datasets
Expand Down
10 changes: 8 additions & 2 deletions gitpod-init.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
mkdir -p /workspace/pyenv
pyenv install 3.9.7
mkdir ~/.kaggle
pip install kaggle
mv /home/gitpod/.pyenv/versions/3.9.7/ /workspace/pyenv/versions/


mkdir -p /workspace/kaggle
touch /workspace/kaggle/kaggle.json
chmod 600 /workspace/kaggle/kaggle.json

curl -o logstash-oss-with-opensearch-output-plugin-7.13.2-linux-x64.tar.gz https://artifacts.opensearch.org/logstash/logstash-oss-with-opensearch-output-plugin-7.13.2-linux-x64.tar.gz
tar -xf logstash-oss-with-opensearch-output-plugin-7.13.2-linux-x64.tar.gz
cd docker
Expand Down

0 comments on commit 038d145

Please sign in to comment.