Skip to content

Commit

Permalink
Remove vec noise as a direct dependency (#284)
Browse files Browse the repository at this point in the history
* remove vec noise as a direct dependency

* add vec noise to docker image
  • Loading branch information
bovard authored Oct 2, 2024
1 parent 367ad45 commit a10e9d6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docker/cpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ ADD ./setup.py ./setup.py
ADD ./README.md ./README.md
ADD ./MANIFEST.in ./MANIFEST.in
ADD ./kaggle_environments ./kaggle_environments
RUN pip install Flask bitsandbytes accelerate && pip install . && pytest
RUN pip install Flask bitsandbytes accelerate vec-noise && pip install . && pytest

CMD kaggle-environments
2 changes: 1 addition & 1 deletion docker/gpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ ADD ./setup.py ./setup.py
ADD ./README.md ./README.md
ADD ./MANIFEST.in ./MANIFEST.in
ADD ./kaggle_environments ./kaggle_environments
RUN pip install Flask bitsandbytes accelerate && pip install . && pytest
RUN pip install Flask bitsandbytes accelerate vec-noise && pip install . && pytest

CMD kaggle-environments
2 changes: 0 additions & 2 deletions kaggle_environments/envs/lux_ai_s2/lux_ai_s2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
syspath.append(__dir__)


import vec_noise

from luxai_s2.env import LuxAI_S2
import numpy as np

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from collections.abc import Iterable

import numpy as np
from vec_noise import snoise2


def symmetrize(x, symmetry="vertical"):
Expand Down Expand Up @@ -91,6 +90,8 @@ def noise(self, x=None, y=None, frequency: float = 1):
x = x + self.noise_shift

x, y = np.meshgrid(x, y)
# importing here because vec_noise causes import issues in cloud functions
from vec_noise import snoise2
total = snoise2(x, y, octaves=self.octaves)
symmetrize(total, self.symmetry)
# Normalize between [0, 1]
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def get_version(rel_path):
"Flask >= 1.1.2",
"numpy >= 1.19.5",
"requests >= 2.25.1",
"vec-noise >= 1.1.4",
"pettingzoo == 1.24.0",
"gymnasium == 0.29.0",
"stable-baselines3 == 2.1.0",
Expand Down

0 comments on commit a10e9d6

Please sign in to comment.