-
Notifications
You must be signed in to change notification settings - Fork 9
Using micromamba and an env file #616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ctr26
wants to merge
6
commits into
main
Choose a base branch
from
docker_permissions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f3f7c61
Using micromamba and an env file
ctr26 1b03b56
[feat] Added container testing to pytest
ctr26 f8b1f1b
[bug] permissions in home dir (tmp)
ctr26 db85edc
[fix] removing redundant installs
ctr26 5807f99
[fix] revert to wei
ctr26 66ad99d
[fix] ports were mismatched
ctr26 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3.8' | ||
|
||
services: | ||
hypha: | ||
build: . | ||
image: amun-ai/hypha | ||
container_name: hypha | ||
command: --port 9520 --host=0.0.0.0 | ||
ports: | ||
- 9520:9520 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
channels: | ||
- anaconda | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- python=3.10 | ||
- conda-forge::minio | ||
- pip | ||
- pip: | ||
- playwright | ||
- -e .[server-apps] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from testcontainers.compose import DockerCompose | ||
import requests | ||
import time | ||
|
||
|
||
def test_server_response(): | ||
compose = DockerCompose( | ||
"./" | ||
) # Assuming docker-compose.yml is in the same directory | ||
print(compose) | ||
|
||
with compose: | ||
# Wait a few seconds for the server to be up | ||
time.sleep(5) | ||
|
||
# Docker Compose typically uses the service name as the hostname | ||
host, port = compose.get_service_host_and_port("hypha", 9520) | ||
|
||
# Construct the URL to test | ||
url = f"http://{host}:{port}" | ||
|
||
result_current_dir = compose.exec_in_container(["touch", "test"]) | ||
|
||
# assert result_current_dir.exit_code == 0 | ||
|
||
result_tmp = compose.exec_in_container(["touch", "/tmp/test"]) | ||
|
||
# assert result_tmp.exit_code == 0 | ||
|
||
print("Write tests passed successfully!") | ||
response = requests.get(url) | ||
if response.status_code == 200: | ||
print("Server responded successfully!") | ||
else: | ||
print(f"Server responded with status code: {response.status_code}") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be more like the
CMD
in theDockerfile
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right, we have it already
hypha/Dockerfile
Line 79 in 81ced64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah the entry point in the dockerfile has it already. This PR was going to add in the permissions fix as well, but I believe @oeway fixed that already during the time this PR has been open. I've rebased on the main branch and now this PR is mostly trying to put some container testing in place.
I'm now just checking to see if bumping the hypha version downstream fixes the permissions issues.
P.s
I think the default port on the original server this ran on was 9000 and that then became the port for the k8s cluster etc etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ctr26 I think the latest one should work for non-privileged rancher cluster, we have tested it with the helm chart included in the repo: https://github.com/amun-ai/hypha/tree/main/helm-charts
So maybe we can close this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I saw that you tried to fix the permission. I'm now updating the bioengine image with the newest hypha to make the egi stuff work.
I think it's a good idea for the docker image testing that I've put here to still be added as it'll be useful for the future.
But otherwise this PR is now rebased to use your dockerfile