[PR #177] [CLOSED] Added Docker, just simple Dockerfile file to make our lives easier #590

Closed
opened 2026-03-13 20:58:36 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/177
Author: @Zetsu4i
Created: 4/20/2025
Status: Closed

Base: mainHead: main


📝 Commits (1)

📊 Changes

1 file changed (+35 additions, -0 deletions)

View changed files

Dockerfile (+35 -0)

📄 Description

New Easy Instructions for Building and Running with Docker

These instructions assume you have Docker installed on your machine.

  1. Save the Dockerfile:(if this PR is merged u dont have too, u just run git clone)

    • Navigate to the root directory of the cloned AI-Writer project on your local machine.
    • Create a new file named Dockerfile (no extension) in this root directory.
    • Copy and paste the content of the Dockerfile provided above into this file.
  2. Build the Docker Image:

    • Open your terminal or command prompt.
    • Navigate to the root directory of the AI-Writer project (where your Dockerfile is located).
    • Run the following command to build the Docker image. This process might take a few minutes as it downloads the base image, installs system dependencies (including Rust), and installs Python packages.
      docker build -t alwrity .
      
      • docker build: The command to build a Docker image.
      • -t alwrity: Tags the image with the name alwrity (you can choose a different name).
      • .: Specifies the build context, meaning Docker will look for the Dockerfile and necessary files in the current directory.
  3. Run the Docker Container:

    • Run the following command to start a container from the alwrity image. You will need to replace the placeholder values with your actual API keys and add environment variables for all the services you intend to use.
      docker run -d -p 8501:8501 \
          -e OPENAI_API_KEY='your_openai_api_key' \
          -e TAVILY_API_KEY='your_tavily_api_key' \
          # Add other API keys as -e ENV_VAR_NAME='your_key'
          # Example: -e COHERE_API_KEY='your_cohere_key'
          # Example: -e GEMINI_API_KEY='your_gemini_key'
          # Example: -e STABILITY_API_KEY='your_stability_key'
          # Example: -e SERPERDEV_API_KEY='your_serperdev_key'
          # ... add more based on features you r use
          --name alwrity_app \
          alwrity
      
      • docker run: Command to run a container.
      • -d: Runs the container in detached mode (in the background).
      • -p 8501:8501: Maps port 8501 on your host machine to port 8501 inside the container. This is how you access the Streamlit UI.
      • -e ENV_VAR_NAME='your_key': Sets environment variables inside the container. You MUST replace 'your_...' with your actual API keys. Add one -e flag for each API key required by the project.
      • --name alwrity_app: Assigns a name to the container for easier management (optional).
      • alwrity: The name of the image to run.
  4. Access the Application:

    • Open your web browser and go to http://localhost:8501.
    • You should see the ALwrity Streamlit application UI. Configure the settings within the UI, which should now be able to pick up the API keys you provided via environment variables (or you might need to enter them in the UI depending on how the app is built).
  5. Finally
    Enjoy & Good luck!


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AJaySi/ALwrity/pull/177 **Author:** [@Zetsu4i](https://github.com/Zetsu4i) **Created:** 4/20/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`2b05f0e`](https://github.com/AJaySi/ALwrity/commit/2b05f0ec6bcc9d2709fda50140b6684d60059054) Add Dockerfile file ### 📊 Changes **1 file changed** (+35 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `Dockerfile` (+35 -0) </details> ### 📄 Description **New Easy Instructions for Building and Running with Docker** These instructions assume you have Docker installed on your machine. 1. **Save the Dockerfile:(if this PR is merged u dont have too, u just run `git clone`)** * Navigate to the root directory of the cloned `AI-Writer` project on your local machine. * Create a new file named `Dockerfile` (no extension) in this root directory. * Copy and paste the content of the Dockerfile provided above into this file. 2. **Build the Docker Image:** * Open your terminal or command prompt. * Navigate to the root directory of the `AI-Writer` project (where your `Dockerfile` is located). * Run the following command to build the Docker image. This process might take a few minutes as it downloads the base image, installs system dependencies (including Rust), and installs Python packages. ```bash docker build -t alwrity . ``` * `docker build`: The command to build a Docker image. * `-t alwrity`: Tags the image with the name `alwrity` (you can choose a different name). * `.`: Specifies the build context, meaning Docker will look for the Dockerfile and necessary files in the current directory. 3. **Run the Docker Container:** * Run the following command to start a container from the `alwrity` image. You will need to replace the placeholder values with your actual API keys and add environment variables for all the services you intend to use. ```bash docker run -d -p 8501:8501 \ -e OPENAI_API_KEY='your_openai_api_key' \ -e TAVILY_API_KEY='your_tavily_api_key' \ # Add other API keys as -e ENV_VAR_NAME='your_key' # Example: -e COHERE_API_KEY='your_cohere_key' # Example: -e GEMINI_API_KEY='your_gemini_key' # Example: -e STABILITY_API_KEY='your_stability_key' # Example: -e SERPERDEV_API_KEY='your_serperdev_key' # ... add more based on features you r use --name alwrity_app \ alwrity ``` * `docker run`: Command to run a container. * `-d`: Runs the container in detached mode (in the background). * `-p 8501:8501`: Maps port 8501 on your host machine to port 8501 inside the container. This is how you access the Streamlit UI. * `-e ENV_VAR_NAME='your_key'`: Sets environment variables inside the container. **You MUST replace `'your_...'` with your actual API keys.** Add one `-e` flag for each API key required by the project. * `--name alwrity_app`: Assigns a name to the container for easier management (optional). * `alwrity`: The name of the image to run. 5. **Access the Application:** * Open your web browser and go to `http://localhost:8501`. * You should see the ALwrity Streamlit application UI. Configure the settings within the UI, which should now be able to pick up the API keys you provided via environment variables (or you might need to enter them in the UI depending on how the app is built). 6. **Finally** Enjoy & Good luck! --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-13 20:58:36 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#590
No description provided.