Skip to content
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

added missing dependency program #71

Closed
wants to merge 3 commits into from

Conversation

rukyr97
Copy link
Contributor

@rukyr97 rukyr97 commented Oct 14, 2022

The installation of pkg-config was mandatory to be successful with running the ./ns3 configure command.

rukyr97 and others added 3 commits October 14, 2022 14:51
The installation of `pkg-config` was mandatory to be successful with running the `./ns3 configure` command.
@rukyr97 rukyr97 closed this Oct 14, 2022
@rukyr97 rukyr97 deleted the rukyr97-patch-1 branch October 14, 2022 15:29
@rukyr97 rukyr97 restored the rukyr97-patch-1 branch October 14, 2022 15:39
@rukyr97 rukyr97 reopened this Oct 14, 2022
@pgawlowicz
Copy link
Contributor

@rukyr97 thanks for this patch. I have applied the two first commits, as I have seen that there are some issues with the last one. Could you fix it? and do another PR?

@pgawlowicz pgawlowicz closed this May 9, 2023
@rukyr97
Copy link
Contributor Author

rukyr97 commented May 9, 2023

The last commit was to solve an issue I was having when running my ns-3 sim script.
For context, I use symbolic links to develop my work outside of the scratch/ folder in ns-3. This requirement of mine was not compliant with the current ns3-gym version. As far as I could tell model/ns3gym/ns3gym/start_sim.py using os.getcwd(), assumes that my ns-3 script would be placed within this scratch/ folder. The patch was a simple and "dirty" workaround to provide ns3-gym the source directory it should consider, avoiding the use of os.getcwd().

To make it work, simply provide the src_dir param in the Ns3Env constructor.


ns3_gym_env = ns3env.Ns3Env(port=port,
                                simSeed=seed,
                                startSim=True,
                                simArgs=sim_args,
                                debug=True,
                                src_dir="~/foo/bar")

For the content of the variable, I use
src_dir = os.path.abspath(os.path.dirname(__file__)) but again it is specific for my use case and it depends on what the user may need :)

@rukyr97
Copy link
Contributor Author

rukyr97 commented May 9, 2023

Actually, I was just refreshing my memory and now I remember that this PR has some issues, but #72 fixes them, iirc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants