🧼 Step 1. Fresh Clean Environments (launch if it's your first start)
\n",
"If you have a healthy and working install, SKIP to STEP 3. This can be launched in CPU mode."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ea5bcd71-2b71-4d27-90c1-053444ef33f0",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"!rm -r /home/studio-lab-user/.cache\n",
"!rm -r /home/studio-lab-user/.conda\n",
"!conda remove -n \"env_name\" --all\n",
"!rm -rf /home/studio-lab-user/*"
]
},
{
"cell_type": "markdown",
"id": "f05fa0e9-8141-471e-a9a5-b12cc04a9c94",
"metadata": {},
"source": [
"☢️*Your Browser Panel (on the left) should be empty.* \n",
"☢️You need to restart the Jupyter Lab now (before running next cell)."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c55242c5-3887-4dd4-a384-0b480b0d11f1",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import subprocess\n",
"\n",
"# Run the command and capture the output\n",
"result = subprocess.run(['du', '-h', '--max-depth=1', '/home/studio-lab-user'], capture_output=True, text=True)\n",
"\n",
"# Check if the desired line is present in the output\n",
"if '1.1G\\t/home/studio-lab-user/.conda' in result.stdout:\n",
" print(\"Ok, your conda is clean (1.1GB) please continue with Step 2\")"
]
},
{
"cell_type": "markdown",
"id": "af2f3f5b-f9ba-4221-92fa-126600e39d9b",
"metadata": {
"tags": []
},
"source": [
"
🔥 Step 2. Install essentials (launch if it's your first start)