Skip to content

Commit

Permalink
fix: do not create /cache and /local_storage in polling agent
Browse files Browse the repository at this point in the history
  • Loading branch information
aneojgurhem committed Mar 6, 2024
1 parent dfcd612 commit b66efbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG VERSION=1.0.0.0
ARG TARGETARCH

RUN mkdir /cache /local_storage

WORKDIR /src
# git ls-tree -r HEAD --name-only --full-tree | grep "csproj$" | xargs -I % sh -c "export D=\$(dirname %) ; echo COPY [\\\"%\\\", \\\"\$D/\\\"]"
COPY ["Adaptors/Amqp/src/ArmoniK.Core.Adapters.Amqp.csproj", "Adaptors/Amqp/src/"]
Expand Down Expand Up @@ -73,9 +71,6 @@ WORKDIR /src/Control/Submitter/src
RUN dotnet publish "ArmoniK.Core.Control.Submitter.csproj" -a $TARGETARCH --no-restore -o /app/publish/submitter /p:UseAppHost=false -p:RunAnalyzers=false -p:WarningLevel=0 -p:PackageVersion=$VERSION -p:Version=$VERSION

FROM base as polling_agent
WORKDIR /
COPY --from=build --chown=$APP_UID:$APP_UID /cache /cache
COPY --from=build --chown=$APP_UID:$APP_UID /local_storage /local_storage
WORKDIR /adapters/queue/pubsub
COPY --from=build /app/publish/pubsub .
WORKDIR /adapters/queue/amqp
Expand Down Expand Up @@ -115,8 +110,6 @@ ENTRYPOINT ["dotnet", "ArmoniK.Core.Control.PartitionMetrics.dll"]


FROM base as submitter
WORKDIR /
COPY --from=build --chown=$APP_UID:$APP_UID /local_storage /local_storage
WORKDIR /adapters/queue/pubsub
COPY --from=build /app/publish/pubsub .
WORKDIR /adapters/queue/amqp
Expand All @@ -131,4 +124,4 @@ ENV ASPNETCORE_URLS http://+:1080, http://+:1081
EXPOSE 1080
EXPOSE 1081

ENTRYPOINT ["dotnet", "ArmoniK.Core.Control.Submitter.dll"]
ENTRYPOINT ["dotnet", "ArmoniK.Core.Control.Submitter.dll"]
2 changes: 1 addition & 1 deletion terraform/modules/compute_plane/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "docker_volume" "socket_vol" {
name = "socket_vol${var.replica_counter}"
driver_opts = {
o : "uid=3333"
o : "uid=3333,gid=3333,mode=0777"
device : "tmpfs"
type : "tmpfs"
}
Expand Down

0 comments on commit b66efbb

Please sign in to comment.