Skip to content

Commit

Permalink
smoal updates
Browse files Browse the repository at this point in the history
  • Loading branch information
josiahls committed Dec 28, 2023
1 parent 199eb5c commit b872a54
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
4 changes: 3 additions & 1 deletion fastrl.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ RUN pip3 install torch>=2.0.0
# --pre --upgrade
RUN pip3 show torch


COPY --chown=$CONTAINER_USER:$CONTAINER_GROUP extra/pip_requirements.txt /home/$CONTAINER_USER/extra/pip_requirements.txt
RUN pip3 install -r extra/pip_requirements.txt

WORKDIR /home/$CONTAINER_USER/fastrl
RUN git clone https://github.com/josiahls/data.git \
&& cd data && pip3 install -e .

# Install Dev Reqs
COPY --chown=$CONTAINER_USER:$CONTAINER_GROUP extra/dev_requirements.txt /home/$CONTAINER_USER/extra/dev_requirements.txt
Expand Down
17 changes: 11 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from setuptools.command.develop import develop
from setuptools.command.install import install
import setuptools
import os
assert parse_version(setuptools.__version__)>=parse_version('36.2')

# note: all settings are in settings.ini; edit there, not here
Expand Down Expand Up @@ -38,17 +39,21 @@
class CustomInstall(install):
def run(self):
# Ensure that torchdata is cloned and installed before proceeding
print('Cloning torchdata')
subprocess.check_call(["git", "clone", TORCHDATA_GIT_REPO])
subprocess.check_call(["pip", "install", "./data"])
print('Installing torchdata')
subprocess.check_call(["pip", "install","-vvv", "./data"])
# Call the standard install.
install.run(self)

class CustomDevelop(develop):
def run(self):
# Ensure that torchdata is cloned but not installed
if not os.path.exists('data'):
print('Cloning torchdata')
subprocess.check_call(["git", "clone", TORCHDATA_GIT_REPO])
subprocess.check_call(["pip", "install", "-e", "./data"])
print('Installing torchdata')
subprocess.check_call(["pip", "install","-vvv", "-e", "./data"])
# Call the standard develop.
develop.run(self)

Expand All @@ -72,9 +77,9 @@ def run(self):
long_description_content_type = 'text/markdown',
zip_safe = False,
entry_points = { 'console_scripts': cfg.get('console_scripts','').split() },
# cmdclass={
# 'install': CustomInstall,
# 'develop': CustomDevelop,
# },
cmdclass={
'install': CustomInstall,
'develop': CustomDevelop,
},
**setup_cfg)

0 comments on commit b872a54

Please sign in to comment.