Skip to content

Doesn't work with Huggingface docker hosting #59630

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
neoapps-dev opened this issue Nov 28, 2024 · 2 comments
Closed

Doesn't work with Huggingface docker hosting #59630

neoapps-dev opened this issue Nov 28, 2024 · 2 comments
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@neoapps-dev
Copy link

here's my Dockerfile,

FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y \
    wget \
    unzip \
    libssl-dev \
    && apt-get clean
RUN wget -O /tmp/dart-sdk.zip https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-x64-release.zip \
    && unzip /tmp/dart-sdk.zip -d /usr/lib \
    && rm /tmp/dart-sdk.zip
ENV PATH="/usr/lib/dart-sdk/bin:$PATH"
WORKDIR /app
COPY . .
RUN dart pub get
RUN mkdir -p /app/.dart-tool /tmp/.dart && chmod -R 777 /app/.dart-tool /tmp/.dart
EXPOSE 8080
CMD ["dart", "run", "bin/main.dart"]

and the error,
===== Application Startup at 2024-11-28 22:26:40 =====

An unexpected error was encountered by the Dart CLI.
Please file an issue at https://github.com/dart-lang/sdk/issues/new with the following details:

Invocation: 'dart run bin/main.dart'
Exception: 'PathAccessException: Creation failed, path = '/.dart-tool' (OS Error: Permission denied, errno = 13)'
Stack Trace:
#0 _Directory.createSync (dart:io/directory_impl.dart:124:7)
#1 _File.createSync (dart:io/file_impl.dart:303:14)
#2 ForwardingFile.createSync (package:file/src/forwarding/forwarding_file.dart:26:16)
#3 createConfigFile (package:unified_analytics/src/initializer.dart:27:14)
#4 runInitialization (package:unified_analytics/src/initializer.dart:88:5)
#5 new Analytics (package:unified_analytics/src/analytics.dart:82:22)
#6 createUnifiedAnalytics (package:dartdev/src/unified_analytics.dart:23:10)
#7 DartdevRunner.runCommand (package:dartdev/dartdev.dart:169:27)
#8 CommandRunner.run. (package:args/command_runner.dart:122:25)
#9 new Future.sync (dart:async/future.dart:313:27)
#10 CommandRunner.run (package:args/command_runner.dart:122:14)
#11 runDartdev (package:dartdev/dartdev.dart:47:29)
#12 main (file:///b/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart:13:11)
#13 _delayEntrypointInvocation. (dart:isolate-patch/isolate_patch.dart:293:33)
#14 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

i tried everything but i couldn't get it to work

@dart-github-bot
Copy link
Collaborator

Summary: Dart application fails to start inside a Docker container due to a permission denied error when creating the .dart-tool directory. The error originates from the unified_analytics package.

@dart-github-bot dart-github-bot added area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Nov 28, 2024
@neoapps-dev
Copy link
Author

okay.. i ditched dart:mirrors and now my app works with AOT

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-dart-cli Use area-dart-cli for issues related to the 'dart' command like tool. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants