[BUG] NotHubDatasetToOverwriteException on docker compose locally
See original GitHub issue🐛🐛 Bug Report
When running docker compose locally, an exception is raised:
hub.exceptions.NotHubDatasetToOverwriteException: Unable to overwrite the dataset.
⚗️ Current Behavior
When I run docker-compose up
I get some error messages. However, I should state that some of the tests do run!
test_1 | ============================= test session starts ==============================
test_1 | platform linux -- Python 3.6.12, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
test_1 | rootdir: /workspace
test_1 | plugins: cov-2.10.1
test_1 | collected 180 items / 1 error / 179 selected
test_1 |
test_1 | ==================================== ERRORS ====================================
test_1 | ______________ ERROR collecting hub/api/tests/test_tensorview.py _______________
test_1 | hub/api/tests/test_tensorview.py:25: in <module>
test_1 | ds = Dataset("./data/test/dataset", shape=(100,), mode="w", schema=my_schema)
test_1 | hub/api/dataset.py:153: in __init__
test_1 | needcreate = self._check_and_prepare_dir()
test_1 | hub/api/dataset.py:307: in _check_and_prepare_dir
test_1 | raise NotHubDatasetToOverwriteException()
test_1 | E hub.exceptions.NotHubDatasetToOverwriteException: Unable to overwrite the dataset. The provided directory is not empty and doesn't contain information about any Hub Dataset. This is a safety check so it won't be possible to overwrite (delete) any folder other than Dataset folder. If this error persists in case of Dataset folder then it means your Dataset data is corrupted. In that case feel free to create an issue in here https://github.com/activeloopai/Hub
test_1 | =========================== short test summary info ============================
test_1 | ERROR hub/api/tests/test_tensorview.py - hub.exceptions.NotHubDatasetToOverwr...
test_1 | !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
test_1 | ============================== 1 error in 12.02s ===============================
test-gpu_1 | ============================= test session starts ==============================
test-gpu_1 | platform linux -- Python 3.6.12, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
test-gpu_1 | rootdir: /workspace
test-gpu_1 | plugins: cov-2.10.1
test-gpu_1 | collected 187 items
test-gpu_1 |
hub_test_1 exited with code 2
Input Code
- REPL or Repo link if applicable:
docker-compose up
Expected behavior/code A clear and concise description of what you expected to happen (or code).
I expected the tests to run. Although perhaps I have missed some configuration for Docker, I looked for some ENV vars I might need to pass in but didn’t see anything.
⚙️ Environment
Python
version(s):- running inside Docker 3.1.0 (51484), the Python version looks like it is: 3.6.12
OS
: [OSX 10.15.6 ]IDE
: [VS-Code]
🖼 Additional context/Screenshots (optional)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Docker Compose release notes
Removed error message showing exit code when using --exit-code-from. Fixes compose#9782. Fixed compose pull to pull images even when they existed locally if ......
Read more >docker compose up - Docker Documentation
The docker compose up command aggregates the output of each container (like docker compose logs --follow does). When the command exits, all containers...
Read more >Try Docker Compose - Docker Documentation
Try Docker Compose. This tutorial is designed to introduce the key concepts of Docker Compose whilst building a simple Python web application.
Read more >Use Docker Compose - Docker Documentation
Docker Compose is a tool that was developed to help define and share multi-container applications. With Compose, we can create a YAML file...
Read more >Environment variables in Compose | Docker Documentation
Set environment variables with 'docker compose run' The value of the DEBUG variable in the container is taken from the value for the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@drewpotter you are doing all right. I have been able to reproduce the error, it fails on a test due because of a packability error as shown in your log.
If you want to run Hub inside docker you can just
then feel free to start a python program and import hub
Still, packability should be resolved. Adding @edogrigqv2 to this thread.
Resolved!