Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
๐Ÿ‘‰ Register now for Flower AI Day 2025!
September 25, ๐Ÿ‡บ๐Ÿ‡ธ San Francisco
Flower Framework
Logo
main

ํŠœํ† ๋ฆฌ์–ผ

  • ์—ฐํ•ฉ ํ•™์Šต์ด๋ž€ ๋ฌด์—‡์ž…๋‹ˆ๊นŒ?
  • Get started with Flower
  • Use a federated learning strategy
  • Build a strategy from scratch
  • Customize the client
  • ๋น ๋ฅธ ์‹œ์ž‘ ํŠœํ† ๋ฆฌ์–ผ
    • Quickstart PyTorch
    • Quickstart TensorFlow
    • Quickstart MLX
    • Quickstart ๐Ÿค— Transformers
    • Quickstart JAX
    • Quickstart Pandas
    • Quickstart fastai
    • Quickstart PyTorch Lightning
    • Quickstart scikit-learn
    • Quickstart XGBoost
    • Quickstart Android
    • Quickstart iOS

How-to Guides

  • Build
    • Flower ์„ค์น˜
    • Configure Clients
    • Design stateful ClientApps
    • ์ „๋žต ์‚ฌ์šฉํ•˜๊ธฐ
    • ์ „๋žต ๊ตฌํ˜„
    • ์ข…ํ•ฉ ํ‰๊ฐ€ ๊ฒฐ๊ณผ
    • Save and Load Model Checkpoints
    • ๊ธฐ๋ณธ ์ œ๊ณต ๋ชจ๋“œ ์‚ฌ์šฉ
    • ์ฐจ๋ถ„ ๊ฐœ์ธ์ •๋ณด ๋ณดํ˜ธ ์‚ฌ์šฉ
    • Implement FedBN
    • Use CLI JSON output
    • Flower 1.0์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œ
    • Upgrade to Flower 1.13
  • Simulate
    • ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ์‹คํ–‰
  • Deploy
    • Run Flower with the Deployment Engine
    • Enable TLS connections
    • SuperNodes ์ธ์ฆํ•˜๊ธฐ
    • Configure logging
    • Run Flower on GCP
    • Run Flower on Azure
    • Docker๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Flower ์‹คํ–‰
      • Quickstart with Docker
      • Enable TLS for Secure Connections
      • Persist the State of the SuperLink
      • Set Environment Variables
      • Run with Root User Privileges
      • Run ServerApp or ClientApp as a Subprocess
      • Pin a Docker Image to a Specific Version
      • Use a Different Flower Version
      • Quickstart with Docker Compose
      • Run Flower Quickstart Examples with Docker Compose
      • Deploy Flower on Multiple Machines with Docker Compose

์„ค๋ช…

  • ์—ฐํ•ฉ ํ‰๊ฐ€
  • ์ฐจ๋“ฑ ํ”„๋ผ์ด๋ฒ„์‹œ
  • Flower ์•„ํ‚คํ…์ฒ˜

์ฐธ์กฐ

  • Reference
    • flwr
      • ํด๋ผ์ด์–ธํŠธ
        • start_client
        • start_numpy_client
        • ํด๋ผ์ด์–ธํŠธ
        • ํด๋ผ์ด์–ธํŠธ์•ฑ
        • NumPyClient
        • mod
          • adaptiveclipping_mod
          • arrays_size_mod
          • fixedclipping_mod
          • make_ffn
          • message_size_mod
          • secagg_mod
          • secaggplus_mod
          • LocalDpMod
      • ๊ณตํ†ต
        • array_from_numpy
        • bytes_to_ndarray
        • ๊ตฌ์„ฑ
        • ์ด๋ฒคํŠธ
        • ๋กœ๊ทธ
        • ndarray_to_bytes
        • ndarrays_to_parameters
        • now
        • parameters_to_ndarrays
        • ๋ฐฐ์—ด
        • ArrayRecord
        • ํด๋ผ์ด์–ธํŠธ ๋ฉ”์‹œ์ง€
        • ์ฝ”๋“œ
        • Config
        • ConfigRecord
        • ์ปจํ”ผ๊ทธ ๋ ˆ์ฝ”๋“œ
        • ์ปจํ…์ŠคํŠธ
        • ์—ฐ๊ฒฐ ํ•ด์ œ
        • ์˜ค๋ฅ˜
        • ํ‰๊ฐ€
        • EvaluateRes
        • ์ด๋ฒคํŠธ ํƒ€์ž…
        • FitIns
        • FitRes
        • GetParametersIns
        • GetParametersRes
        • GetPropertiesIns
        • GetPropertiesRes
        • Message
        • MessageType
        • MessageTypeLegacy
        • Metadata
        • MetricRecord
        • Metrics
        • MetricsRecord
        • NDArray
        • NDArrays
        • ํŒŒ๋ผ๋ฏธํ„ฐ
        • ParametersRecord
        • Properties
        • ReconnectIns
        • RecordDict
        • RecordSet
        • ServerMessage
        • Status
      • ์„œ๋ฒ„
        • start_server
        • ClientManager
        • Driver
        • Grid
        • History
        • LegacyContext
        • Server
        • ServerApp
        • ServerAppComponents
        • ServerConfig
        • SimpleClientManager
        • strategy
          • Bulyan
          • DPFedAvgAdaptive
          • DPFedAvgFixed
          • DifferentialPrivacyClientSideAdaptiveClipping
          • DifferentialPrivacyClientSideFixedClipping
          • DifferentialPrivacyServerSideAdaptiveClipping
          • DifferentialPrivacyServerSideFixedClipping
          • FaultTolerantFedAvg
          • FedAdagrad
          • FedAdam
          • FedAvg
          • FedAvgAndroid
          • FedAvgM
          • FedMedian
          • FedOpt
          • FedProx
          • FedTrimmedAvg
          • FedXgbBagging
          • FedXgbCyclic
          • FedXgbNnAvg
          • FedYogi
          • Krum
          • QFedAvg
          • Strategy
        • workflow
          • DefaultWorkflow
          • SecAggPlusWorkflow
          • SecAggWorkflow
      • simulation
        • run_simulation
        • run_simulation_process
        • start_simulation
        • SimulationIoConnection
    • Flower CLI ์ฐธ์กฐ
    • Example projects
    • Telemetry
    • Changelog
    • Flower Runtime Comparison
    • Flower Network Communication
    • Exit Codes
      • [0] SUCCESS
      • [1] GRACEFUL_EXIT_SIGINT
      • [2] GRACEFUL_EXIT_SIGQUIT
      • [3] GRACEFUL_EXIT_SIGTERM
      • [100] SUPERLINK_THREAD_CRASH
      • [101] SUPERLINK_LICENSE_INVALID
      • [102] SUPERLINK_LICENSE_MISSING
      • [300] SUPERNODE_REST_ADDRESS_INVALID
      • [301] SUPERNODE_NODE_AUTH_KEYS_REQUIRED
      • [302] SUPERNODE_NODE_AUTH_KEYS_INVALID
      • [600] COMMON_ADDRESS_INVALID
      • [601] COMMON_MISSING_EXTRA_REST
      • [602] COMMON_TLS_NOT_SUPPORTED
    • ์ž์ฃผ ๋ฌป๋Š” ์งˆ๋ฌธ

๊ธฐ์—ฌ์ž ๋ฌธ์„œ

  • Contribute
    • GitHub์—์„œ ๊ธฐ์—ฌํ•˜๊ธฐ
    • ๊ธฐ์—ฌ์ž๋กœ ์‹œ์ž‘ํ•˜๊ธฐ
    • ๊ฐœ๋ฐœ ๋ฒ„์ „ ์„ค์น˜ํ•˜๊ธฐ
    • ๊ฐ€์ƒ ํ™˜๊ฒฝ ์„ค์ •
    • VSCode Dev Container์—์„œ ๊ฐœ๋ฐœ
    • ๋ฌธ์„œ ์ž‘์„ฑ
    • Flower ๋ฆด๋ฆฌ์ฆˆ ํ•˜๊ธฐ
    • ๋ฒˆ์—ญ ๊ธฐ์—ฌ
    • How to Build Docker Flower Images Locally
    • Public and private APIs
    • ํ›Œ๋ฅญํ•œ ์ฒซ ๋ฒˆ์งธ ๊ธฐ์—ฌ
    • Secure Aggregation ํ”„๋กœํ† ์ฝœ
  • v1.8.0
  • v1.9.0
  • v1.10.0
  • v1.11.0
  • v1.11.1
  • v1.12.0
  • v1.13.0
  • v1.13.1
  • v1.14.0
  • v1.15.0
  • v1.15.1
  • v1.15.2
  • v1.16.0
  • v1.17.0
  • v1.18.0
  • v1.19.0
  • main
🇬🇧 🇫🇷 🇨🇳 🇰🇷
Back to top
View this page

Persist the State of the SuperLinkยถ

By default, the Flower SuperLink keeps its state in-memory. When using the Docker flag --rm, the state is not persisted between container starts.

If you want to persist the state of the SuperLink on your host system, all you need to do is specify a directory where you want to save the file on your host system and a name for the database file.

By default, the SuperLink container runs with a non-root user called app with the user ID 49999. When working with Docker on Linux, it is recommended to create a new directory and set the user ID to 49999 to ensure the mounted directory has the proper permissions.

If you later want to delete the directory, you can change the user ID back to the current user ID by running sudo chown -R $USER:$(id -gn) state.

์˜ˆ์‹œยถ

In the example below, we create a new directory called state, change the user ID and tell Docker via the flag --volume to mount the local state directory into the /app/state directory of the container. Lastly, we use the flag --database to specify the name of the database file.

$ mkdir state
$ sudo chown -R 49999:49999 state
$ docker run --rm \
     --volume ./state/:/app/state flwr/superlink:1.19.0 \
     --database state.db \
     <additional-args>

As soon as the SuperLink starts, the file state.db is created in the state directory on your host system. If the file already exists, the SuperLink tries to restore the state from the file. To start the SuperLink with an empty database, ensure that there is no database called state.db in the state directory (rm state.db) before you execute the docker run command above.

Next
Set Environment Variables
Previous
Enable TLS for Secure Connections
Copyright © 2025 Flower Labs GmbH
Made with Sphinx and @pradyunsg's Furo
On this page
  • Persist the State of the SuperLink
    • ์˜ˆ์‹œ