pull/575/head
S 8 months ago
parent eba2a2db4e
commit 9bce5cce46

2
.gitignore vendored

@ -220,3 +220,5 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.vscode/settings.json
notes.txt
/private

@ -1,21 +1,19 @@
# ==================================
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set the working directory in the container
WORKDIR /usr/src/swarms
# Install Python dependencies
# COPY requirements.txt and pyproject.toml if you're using poetry for dependency management
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install -r requirements.txt
# Install the 'swarms' package, assuming it's available on PyPI
RUN pip install -U swarms

@ -0,0 +1,16 @@
#!/bin/bash
total_size=0
while read -r package; do
# Fetch package info from PyPI
size=$(curl -s "https://pypi.org/pypi/$package/json" | jq '.releases | to_entries | map(.value[].size) | add')
if [ "$size" != "null" ]; then
echo "$package: $(echo "scale=2; $size/1024/1024" | bc) MB"
total_size=$(echo "$total_size + $size" | bc)
else
echo "$package: Not found"
fi
done <requirements.txt
echo "Total size: $(echo "scale=2; $total_size/1024/1024" | bc) MB"
Loading…
Cancel
Save