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

Docker run gives load file failed #25

Open
mateusmcorrea opened this issue Jan 14, 2024 · 20 comments
Open

Docker run gives load file failed #25

mateusmcorrea opened this issue Jan 14, 2024 · 20 comments

Comments

@mateusmcorrea
Copy link

Hello,

I am trying to run the application via Docker with the following command:

docker run pf -it -v $(pwd):/tmp "DJIFlightRecord_CC.txt"

But I always get the error:

load file failed

Am I doing something wrong ?

Thank you for your support.

@mateusmcorrea
Copy link
Author

DJIFlightRecord_CC.txt

@mateusmcorrea
Copy link
Author

Here my folder structure:

image

@mateusmcorrea
Copy link
Author

image

@dji-dev
Copy link

dji-dev commented Jan 15, 2024

Agent comment from xiaorong.zheng in Zendesk ticket #99045:

Please try adding /tmp in front of the file directory, such as the following command: docker run -v $(pwd):/tmp pf "/tmp/V132_DJIFlightRecord_2020-06-18_[19-01-24].txt" > json_result. json

°°°

@ggpaeg
Copy link

ggpaeg commented Jan 15, 2024

Same problem here, just tried with /tmp but still got "load file failed" as a result.

@mateusmcorrea
Copy link
Author

@dji-dev
image
Another error

@dji-dev
Copy link

dji-dev commented Jan 16, 2024

Agent comment from xiaorong.zheng in Zendesk ticket #99045:

Is there an extra space present within your command?
image.png

°°°

@mateusmcorrea
Copy link
Author

mateusmcorrea commented Jan 16, 2024

@dji-dev Still the same issue
image

@mateusmcorrea
Copy link
Author

Here is the command

docker run -v $(pwd):/tmp pf "/tmp/DJIFlightRecord_CC.txt" > json_result.json

@mateusmcorrea
Copy link
Author

mateusmcorrea commented Jan 16, 2024

Also tried
docker run pf -v $(pwd):/tmp "/tmp/DJIFlightRecord_CC.txt"

which gives load file failed in the terminal

and docker run pf -v $(pwd):/tmp "/tmp/DJIFlightRecord_CC.txt" > json_result.json

which gives load file failed in the json file

@mateusmcorrea
Copy link
Author

Here is my folder structure
image

@dji-dev
Copy link

dji-dev commented Jan 19, 2024

Agent comment from xiaorong.zheng in Zendesk ticket #99045:

Could you kindly inform me of the version of FlightRecordLib that you are currently utilizing? We have found that parsing your files is seamless with the latest iteration, which is version 1.0.5.

°°°

@mateusmcorrea
Copy link
Author

I'm using 1.0.5 version @dji-dev

@Daria-Shevchenko
Copy link

I have the same issue. When I informed dji support about it, they said that this is their bug. I hope they fix it soon.

Screenshot 2024-01-19 at 12 05 25

@dji-dev
Copy link

dji-dev commented Jan 31, 2024

Agent comment from xiaorong.zheng in Zendesk ticket #99045:

We've confirmed this issue and have it scheduled for repair. We anticipate that the fix will be included in a release towards the end of February or early March.

°°°

@HeltDav
Copy link

HeltDav commented Jan 31, 2024

Hi mateusmcorrea

I am running the app 1.0.5 version in Docker WSL 2 backend on a windows10 system.

After changing line 7 in the Dockerfile to (as suggested by roothetic in another issue):
RUN apt-get install -y wget git gcc g++ make cmake libcurl4-openssl-dev zlib1g-dev

After changing $(pwd):/tmp to %cd%:/tmp
docker run -v %cd%:/tmp pf "/tmp/ DJIFlightRecord_CC.txt" > DJIFlightRecord_CC.json
it worked for me.

Maybe it helps
Regards David

@mateusmcorrea
Copy link
Author

mateusmcorrea commented Feb 6, 2024

Well, I succeeded to make it work.
My path was the issue, I guess Docker does not like when there are empty spaces or lower+upper cases on the folder path.

image

image
image

I've renamed the folder to a simple name: flight
I've put this folder somewhere else out of my own user name path, to avoid taking it into account.

I've place it on C:\ directly

@davidmcarter
Copy link

davidmcarter commented Feb 12, 2024

Hi - I'm really sorry to ask - but would someone who is running the sample app in Docker Desktop on Windows mind letting have a copy of their dockerfile and the docker run command they are using please? I've spent hours reading what must be nearly the entire contents of the internet relating this issue, and going round in circles trying various options to find the right combination - all of which seem to run into various dead ends! My desk now has a forehead-shaped contour in it...!

I realise I must be missing something very obvious, but at this stage am lost in the woods... :(

Details below.

Many thanks

David

I'm using the dockerfile contents as per the ReadMe file on Github.

Using the line "RUN sh generate.sh" in the dockerfile then I get a load of error messages - the summary of which is:

C:\flight\flight>docker run -v "%cd%":/tmp pf
: not found: 3: generate.sh:
: not found: 5: generate.sh:
Which do you want to build? Please Input the number:
" does not exist.source directory "/parse_flyrecord/dji-flightrecord-kit/source/FRSample
Specify --help for usage, or press the help button on the CMake GUI.
make: the '-j' option requires a positive integer argument
Usage: make [options] [target] ......
Dockerfile:14
--------------------
  12 |
  13 |     WORKDIR /parse_flyrecord/dji-flightrecord-kit/build/Ubuntu/FRSample
  14 | >>> RUN sh generate.sh
  15 |
  16 |     ENTRYPOINT ["./FRSample"]
--------------------
ERROR: failed to solve: process "/bin/sh -c sh generate.sh" did not complete successfully: exit code: 127

If I use "CMD sh generate.sh" instead of "RUN sh generate.sh" in the dockerfile then the docker build completes but then when running:
C:\flight\flight>docker run -v "%cd%":/tmp pf "/tmp/DJIFlightRecord_2024-01-19_[14-23-13].txt" > json_result.json

I receive the following:
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "./FRSample": stat ./FRSample: no such file or directory: unknown.

@TheWerewolf
Copy link

TheWerewolf commented Feb 28, 2024

I'm actually trying to build under Ubuntu running in a VirtualBox instance and I'm having a similar problem as @davidmcarter

My home directory is "/home/werewolf" and my steps were:

  1. installed docker as per docker's instructions and got the "Hello world" output.
  2. git to FlightRecordParseLib to /home/werewolf/flightparser
  3. cd /home/werewolf/flightparser
  4. Then "sudo docker build --build-arg SDK_KEY=my_app_key_here -t pf ." (running without sudo fails badly)

In my case it complains that it cannot find CURL (missing: CURL_INCLUDE_DIR)

ERROR [7/7] RUN sh generate.sh 1.7s


[7/7] RUN sh generate.sh:
0.282 Which do you want to build? Please Input the number:
0.552 -- The C compiler identification is GNU 5.4.0
0.727 -- The CXX compiler identification is GNU 5.4.0
0.741 -- Check for working C compiler: /usr/bin/cc
0.808 -- Check for working C compiler: /usr/bin/cc -- works
0.809 -- Detecting C compiler ABI info
0.869 -- Detecting C compiler ABI info - done
0.874 -- Detecting C compile features
1.069 -- Detecting C compile features - done
1.073 -- Check for working CXX compiler: /usr/bin/c++
1.148 -- Check for working CXX compiler: /usr/bin/c++ -- works
1.149 -- Detecting CXX compiler ABI info
1.218 -- Detecting CXX compiler ABI info - done
1.223 -- Detecting CXX compile features
1.575 -- Detecting CXX compile features - done
1.579 CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
1.579 Could NOT find CURL (missing: CURL_INCLUDE_DIR)
1.579 Call Stack (most recent call first):
1.579 /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
1.579 /usr/share/cmake-3.5/Modules/FindCURL.cmake:61 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
1.579 CMakeLists.txt:14 (find_package)
1.579
1.580
1.580 -- Configuring incomplete, errors occurred!
1.580 See also "/parse_flyrecord/dji-flightrecord-kit/build/Ubuntu/FRSample/CMakeFiles/CMakeOutput.log".
1.586 make: *** No targets specified and no makefile found. Stop.


Dockerfile:14

12 |
13 | WORKDIR /parse_flyrecord/dji-flightrecord-kit/build/Ubuntu/FRSample
14 | >>> RUN sh generate.sh
15 |
16 | ENTRYPOINT ["./FRSample"]

ERROR: failed to solve: process "/bin/sh -c sh generate.sh" did not complete successfully: exit code: 2

There is no directory /parse_flyrecord/dji-flightrecord-kit/build/Ubuntu/FRSample/CMakeFiles/ or /home/werewolf/flightparserdji-flightrecord-kit/build/Ubuntu/FRSample/CMakeFiles/

Also, I can run curl from the command line, so it's definitely there. I even tried adding curl to the "RUN apt-get install -y wget git gcc g++ make cmake" line in Dockerfile - no difference.
'
I should point out that my main dev environment is Visual Studio on Windows and macOS or XCode on macOS, so I'm learning this dev environment as I go along. It's been YEARS since I worked with Unix or Linux.

UPDATE: The change proposed in this pull request fixes the CURL problem and allows the docker build to complete.

08d4547

@dji-dev
Copy link

dji-dev commented Apr 3, 2024

Agent comment from xiaorong.zheng in Zendesk ticket #99045:

We have already reported the issue with Docker Ubuntu builds to our development team, and they will address this problem in the upcoming release of FlightRecord. Thank you for your understanding!

°°°

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

No branches or pull requests

7 participants