vault backup: 2026-01-05 13:03:55

This commit is contained in:
windyboy
2026-01-05 13:03:55 +08:00
parent 21460fc35d
commit be7c6cdcc9
589 changed files with 396508 additions and 27 deletions
@@ -0,0 +1,116 @@
---
page-title: "5 Ways to Empty or Delete a Large File Content in Linux"
url: https://www.tecmint.com/empty-delete-file-content-linux/
date: "2023-04-18 15:54:25"
---
Occasionally, while dealing with files in Linux terminal, you may want to clear the content of a file without necessarily opening it using any [Linux command line editors](https://www.tecmint.com/linux-command-line-editors/). How can this be achieved? In this article, we will go through several different ways of emptying file content with the help of some useful commands.
**Caution**: Before we proceed to looking at the various ways, note that because in [Linux everything is a file](https://www.tecmint.com/explanation-of-everything-is-a-file-and-types-of-files-in-linux/), you must always make sure that the file(s) you are emptying are not important user or system files. Clearing the content of a critical system or configuration file could lead to a fatal application/system error or failure.
With that said, below are means of clearing file content from the command line.
**Important**: For the purpose of this article, weve used file `access.log` in the following examples.
### 1\. Empty File Content by Redirecting to Null
A easiest way to empty or blank a file content using shell redirect `null` (non-existent object) to the file as below:
\# > access.log
[![Empty Large File Using Null Redirect in Linux](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-Large-File-in-Linux.png)](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-Large-File-in-Linux.png)
Empty Large File Using Null Redirect in Linux
### 2\. Empty File Using true Command Redirection
Here we will use a symbol `:` is a shell built-in command that is essence equivalent to the `true` command and it can be used as a no-op (no operation).
Another method is to redirect the output of `:` or `true` built-in command to the file like so:
\# : > access.log
OR
# true > access.log
[![Empty Large File Using Linux Commands](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-Large-File-Using-Linux-Commands.png)](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-Large-File-Using-Linux-Commands.png)
Empty Large File Using Linux Commands
### 3\. Empty File Using cat/cp/dd utilities with /dev/null
In Linux, the `null` device is basically utilized for discarding of unwanted output streams of a process, or else as a suitable empty file for input streams. This is normally done by redirection mechanism.
And the `/dev/null` device file is therefore a special file that writes-off (removes) any input sent to it or its output is same as that of an empty file.
Additionally, you can empty contents of a file by redirecting output of `/dev/null` to it (file) as input using [cat command](https://www.tecmint.com/13-basic-cat-command-examples-in-linux/):
\# cat /dev/null > access.log
[![Empty File Using cat Command](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-File-Using-cat-Command.png)](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-File-Using-cat-Command.png)
Empty File Using cat Command
Next, we will use [cp command](https://www.tecmint.com/progress-monitor-check-progress-of-linux-commands/) to blank a file content as shown.
\# cp /dev/null access.log
[![Empty File Content Using cp Command](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-File-Content-Using-cp-Command.png)](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-File-Content-Using-cp-Command.png)
Empty File Content Using cp Command
In the following command, `if` means the input file and `of` refers to the output file.
\# dd if=/dev/null of=access.log
[![Empty File Content Using dd Command](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-File-Content-Using-dd-Command.png)](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-File-Content-Using-dd-Command.png)
Empty File Content Using dd Command
### 4\. Empty File Using echo Command
Here, you can use an [echo command](https://www.tecmint.com/echo-command-in-linux/) with an empty string and redirect it to the file as follows:
\# echo "" > access.log
OR
# echo > access.log
[![Empty File Using echo Command](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-File-Using-echo-Command.png)](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-File-Using-echo-Command.png)
Empty File Using echo Command
**Note**: You should keep in mind that an empty string is not the same as null. A string is already an object much as it may be empty while null simply means non-existence of an object.
For this reason, when you redirect the out of the [echo command](https://www.tecmint.com/echo-command-in-linux/) above into the file, and view the file contents using the [cat command](https://www.tecmint.com/13-basic-cat-command-examples-in-linux/), is prints an empty line (empty string).
To send a null output to the file, use the flag `-n` which tells **echo** to not output the trailing newline that leads to the empty line produced in the previous command.
\# echo -n "" > access.log
[![Empty File Using Null Redirect](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-File-Using-Null-Redirect.png)](https://www.tecmint.com/wp-content/uploads/2016/12/Empty-File-Using-Null-Redirect.png)
Empty File Using Null Redirect
### 5\. Empty File Using truncate Command
The **truncate** command helps to [shrink or extend the size of a file](https://www.tecmint.com/parted-command-to-create-resize-rescue-linux-disk-partitions/) to a defined size.
You can employ it with the `-s` option that specifies the file size. To empty a file content, use a size of 0 (zero) as in the next command:
\# truncate -s 0 access.log
[![Truncate File Content in Linux](https://www.tecmint.com/wp-content/uploads/2016/12/Truncate-File-Content-in-Linux.png)](https://www.tecmint.com/wp-content/uploads/2016/12/Truncate-File-Content-in-Linux.png)
Truncate File Content in Linux
Thats it for now, in this article we have covered multiple methods of clearing or emptying file content using simple command line utilities and shell redirection mechanism.
These are not probably the only available practical ways of doing this, so you can also tell us about any other methods not mentioned in this guide via the feedback section below.
## If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
[![Support Us](https://www.tecmint.com/wp-content/uploads/2015/01/coffee.png)](https://www.buymeacoffee.com/tecmint)
**We are thankful for your never ending support.**
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,159 @@
---
page-title: "Base64 Encode and Decode From Command Line"
url: https://linuxhint.com/base64_encode_decode_command_line/
date: "2023-04-24 14:41:54"
---
Encoding is the process used to convert data in a format required for effective transmission or storage. In contrast, decoding is opposite to the encoding method which converts the encoded data back to its original format. Base64 is the encoding process where the binary data is converted into ASCII. Base64 encoding is mostly required to avoid the transmission problems that occur when binary data is transmitted to text-based systems which cannot handle the binary data properly. As a result, the information is lost or corrupted during transmission.
Some of the uses of encoding are:
- Data compression
- Data hiding
- Transmission of data in another format
For encoding data, Base64 uses only alphabet, number and = symbol. For instance, **c2FtcGxlCg==** is a valid encoded data while **b?HV3.Zh2J==** is not a valid encoded data.
In this Linux Hint tutorial, we will explain how to use the base64 command to encode and decode the data in a string or a file. We have performed the commands on Ubuntu 20.04 Focal Fossa system. However, you can also run the same commands on other Linux distributions.
## Base64 Syntax
Here is the syntax for encoding using Base64:
## Options
Some of the command-line options that can be used with base64 command are:
Use this option to decode a file or a string.
Use this option to display help regarding the usage of base64.
Use this option while decoding to ignore non-alphabet characters
Use this option to display version information
## Encoding String
You can easily encode a string using the base64 command. For instance, to encode a sample text “Welcome to Linux” to base64, the command would be:
echo “Welcome to Linux” | base64
Terminal Output:
linuxhint@hp34:~$ echo "Welcome to Linux" | base64
V2VsY29tZSB0byBMaW51eAo\=
This command will encode the text in the string using base64 and print the encoded text to standard output as shown in the Terminal Output above.
You can also save the encoded output to a file rather than printing to standard output using the redirection operator (>). The following command will encode the text and save the output to a file named “encodedfile.txt:
echo “Welcome to Linux” | base64 \> encodedfile.txt
To view the encoded file, you can use the cat command:
Terminal Output:
linuxhint@hp34:~$ cat encodedfile.txt
4oCcV2VsY29tZSB0byBMaW51eOKAnQo\=
## Decoding String
You can also decode the base64 encoded text using the decode or -d option. For instance to decode base64 encoded text “V2VsY29tZSB0byBMaW51eAo=”, the command would be:
echo  4oCcV2VsY29tZSB0byBMaW51eOKAnQo\= | base64 \--decode
This command will decode the base64 encoded text and print the original text on the standard output as shown in the following Terminal Output.
Terminal Output:
linuxhint@hp34:~$ echo  4oCcV2VsY29tZSB0byBMaW51eOKAnQo\= | base64 \--decode
“Welcome to Linux”
## Encoding Text File
The base64 command can also be used to encode a text file. For this example lets create a text file with some content first using this command on the terminal, or use any textfile.
echo """I Love Linux
I Love Linux
I Love Linux
LinuxHint is my homepage""" \> testfile.txt
To encode this or any text file named “testfile.txt”, the command would be:
This command will encode the specified text file and print its encoded form on the standard output as shown in the following Terminal Output:
linuxhint@hp34:~$ base64 testfile.txt
SSBMb3ZlIExpbnV4CkkgTG92ZSBMaW51eApJIExvdmUgTGludXgKTGludXhIaW50IGlzIG15IGhv
bWVwYWdlCg\==
You can also save the encoded output to a file rather than printing to standard output using the redirection operator (>). The following command will convert the text in the file using base64 and save the output to another file named “encodedfile.txt”. The command does not print anything to the screen.
base64 testfile.txt \> encodedfile.txt
To view the encoded file, you can use the cat command:
Terminal Output:
linuxhint@hp34:~$ base64 testfile.txt \> encodedfile.txt
linuxhint@hp34:~$ cat encodedfile.txt
SSBMb3ZlIExpbnV4CkkgTG92ZSBMaW51eApJIExvdmUgTGludXgKTGludXhIaW50IGlzIG15IGhv
bWVwYWdlCg\==
## Decoding Text File
To decode an encoded text file, use the decode or -d option. For instance to decode base64 encoded text file “encodedfile.txt”, the command would be:
base64 \-d encodedfile.txt
This command will decode the base64 encoded text file and print the original text on the standard output as shown in the following Terminal Output:
Terminal Output:
linuxhint@hp34:~$ base64 \-d encodedfile.txt
I Love Linux
I Love Linux
I Love Linux
LinuxHint is my homepage
linuxhint@hp34:~$
## Encoding User Input
Using the base64 encoding, we can encode any user-provided data. For this purpose, we will need to create a script that will take user input, encode it using base64 encoding, and print the encoded data on standard output. Create a script “test.sh” with the following code:
#!/bin/bash
\# Print message to ask for input
echo "Provide Some data to encode"
\# Save the input to a variable named “data”
read data
\# Encode using base64 encoding and save the output to a variable “encod\_data”
encod\_data\=\`echo \-n $data | base64\`
\# Print encoded output
echo "Encoded text is : $encod\_data"
Run the script as follows:
chmod 755 test.sh; ./test.sh
After running the script, you will be asked to input the data that you want to encode. Type some data and press Enter, and you will receive the encoded output on the screen as shown below:
Terminal Output:
linuxhint@hp34:~$ chmod 755 test.sh; ./test.sh
Provide Some data to encode
I love linux
Encoded text is : SSBsb3ZlIGxpbnV4
This encoded text can be sent over the internet or to another program and then decoded later using a simple command. For this command we assume the receiving program, decode.sh, has put the encoded data into a variable in BASH called **RECEIVED\_ENCODING**.
#!/bin/bash
RECEIVED\_ENCODING\=SSBsb3ZlIGxpbnV4
RECEIVED\_STRING\=\`echo  $RECEIVED\_ENCODING | base64 --decode\`
echo $RECEIVED\_STRING
Here you can see the results of the receiving program in the Terminal Output:
linuxhint@hp34:~$ chmod 755 decode.sh ; ./decode.sh
I love linux
## Conclusion
This is how you can use the base64 to encode and decode a string or a file from the command line. The results can be printed on the standard output, saved in a variable or a file, or passed over the network to another program. However, remember that encoding is not similar to encryption, and one can easily reveal the encoded data, so it is not recommended to use encoding for the transmission of sensitive data unless its also encrypted.
### About the author
![](https://linuxhint.com/wp-content/uploads/2017/12/wolfman-150x150.jpg)
Linux Wolfman is interested in Operating Systems, File Systems, Databases and Analytics and always watching for new technologies and trends. Reach me by tweeting to [@linuxhint](https://twitter.com/linuxhint) and ask for the Wolfman.
@@ -0,0 +1,707 @@
---
page-title: "Best 100+ Stable Diffusion Prompts: The Most Beautiful AI Text-to-Image Prompts | Metaverse Post"
url: https://mpost.io/best-100-stable-diffusion-prompts-the-most-beautiful-ai-text-to-image-prompts/
date: "2023-04-23 13:45:31"
---
> gorgeous young Swiss girl sitting by window with headphones on, wearing white bra with translucent shirt over, soft lips, beach blonde hair, octane render, unreal engine, photograph, realistic skin texture, photorealistic, hyper realism, highly detailed, 85mm portrait photography, award winning, hard rim lighting photographybeta ar 9:16 s 5000 testp upbeta upbeta upbeta
---
With the help of the text-to-image model Stable Diffusion, anyone may quickly transform their ideas into works of art.
You must perfect your prompts in order to receive decent outcomes from Stable Diffusion AI. The level of the prompt you provide will directly affect the level of detail and quality of the artwork.
You will find 100+ the most beautiful text-to-image Stable Diffusion prompts and the resulting output in this article, which will undoubtedly treat you visually. You can utilize these prompts also on Midjourney or DALL-E, if youd like.
Use one of the [free Stable Diffusion prompt generators](https://mpost.io/7-best-ai-art-generators-of-2022-midjourney-dall-e-nightcafe-artbreeder/) on the market if you usually struggle to come up with good prompts.
[![Best 100+ Stable Diffusion Prompts: The Most Beautiful AI Text-to-Image Prompts](https://mpost.io/wp-content/uploads/image-86-60-762x1024.jpg)](https://www.soulgen.ai/?utm_source=ref-mpost&cp_id=sdprompts)
![](https://mpost.io/wp-content/uploads/cropped-Damir-96x96.png)
Published: 16 September 2022, 9:05 am Updated: 08 Mar 2023, 8:22 am
Pro Tips
1\. With the help of [AI generators](https://mpost.io/7-best-ai-art-generators-of-2022-midjourney-dall-e-nightcafe-artbreeder/), businesses can generate effective results from their [AI marketing strategies](https://mpost.io/10-best-ai-marketing-apps-and-tools-innovative-digital-advertising/).
2\. Utilizing the combination of [AI voice generators](https://mpost.io/top-7-ai-voice-generators-and-voice-cloning-for-text-to-speech/) and [AI SEO tools](https://mpost.io/top-10-ai-powered-seo-tools-in-2023-for-digital-marketers/), businesses can unlock an unprecedented potential for online success.
3\. Check out [AI logo creators](https://mpost.io/5-best-free-ai-logo-makers-of-2023-class-up-your-business-with-an-artificially-intelligent-designer/) enable designers to create aesthetically pleasing logos with a fraction of the effort and time it would usually take.
4\. [AI photo editors](https://mpost.io/best-ai-photo-editors/) can help amateur photographers achieve professional-looking results.
5\. These [videos](https://mpost.io/how-to-earn-up-to-1000-every-day-using-chatgpt-5-videos/) are designed to provide you with practical tips and tricks on how to leverage AI technologies to make money online.
## Best AI Photography Prompts
**Prompt #1**
![Prompt: portrait photo of a asia old warrior chief, tribal panther make up, blue on red, side profile, looking away, serious eyes, 50mm portrait photography, hard rim lighting photography--beta --ar 2:3 --beta --upbeta --upbeta](https://mpost.io/wp-content/uploads/image-46-32.jpg)
Prompt: portrait photo of a asia old warrior chief, tribal panther make up, blue on red, side profile, looking away, serious eyes, 50mm portrait photography, hard rim lighting photographybeta ar 2:3 beta upbeta upbeta
**Prompt #2**
![Prompt: Keanu Reeves portrait photo of a asia old warrior chief, tribal panther make up, blue on red, side profile, looking away, serious eyes, 50mm portrait photography, hard rim lighting photography--beta --ar 2:3 --beta --upbeta --beta --upbeta --beta --upbeta](https://mpost.io/wp-content/uploads/image-46-33.jpg)
Prompt: Keanu Reeves portrait photo of a asia old warrior chief, tribal panther make up, blue on red, side profile, looking away, serious eyes, 50mm portrait photography, hard rim lighting photographybeta ar 2:3 beta upbeta beta upbeta beta upbeta
**Prompt #****3**
![portrait photo of a african old warrior chief, tribal panther make up, gold on white, side profile, looking away, serious eyes, 50mm portrait photography, hard rim lighting photography--beta --ar 2:3 --beta](https://mpost.io/wp-content/uploads/image-46-34.jpg)
portrait photo of a african old warrior chief, tribal panther make up, gold on white, side profile, looking away, serious eyes, 50mm portrait photography, hard rim lighting photographybeta ar 2:3 beta
**Prompt #****4**
![priest, blue robes, 68 year old man, national geographic, portrait, photo, photography --s 625 --q 2 --iw 3](https://mpost.io/wp-content/uploads/image-46-35.jpg)
priest, blue robes, 68 year old man, national geographic, portrait, photo, photography s 625 q 2 iw 3
**Prompt #****5**
![ultrarealistic, (native american old woman ) portrait, cinematic lighting, award winning photo, no color, 80mm lense --beta --upbeta --upbeta](https://mpost.io/wp-content/uploads/image-46-36.jpg)
ultrarealistic, (native american old woman ) portrait, cinematic lighting, award winning photo, no color, 80mm lense beta upbeta upbeta
**Prompt #****6**
![portrait photo headshot by mucha, sharp focus, elegant, render, octane, detailed, award winning photography, masterpiece, rim lit](https://mpost.io/wp-content/uploads/image-46-37.jpg)
portrait photo headshot by mucha, sharp focus, elegant, render, octane, detailed, award winning photography, masterpiece, rim lit
**Prompt #****7**
![a vibrant professional studio portrait photography of a young, pale, goth, attractive, friendly, casual, delightful, intricate, gorgeous, female, piercing green eyes, wears a gold ankh necklace, femme fatale, nouveau, curated collection, annie leibovitz, nikon, award winning, breathtaking, groundbreaking, superb, outstanding, lensculture portrait awards, photoshopped, dramatic lighting, 8 k, hi res --testp --ar 3:4 --upbeta](https://mpost.io/wp-content/uploads/image-46-38.jpg)
a vibrant professional studio portrait photography of a young, pale, goth, attractive, friendly, casual, delightful, intricate, gorgeous, female, piercing green eyes, wears a gold ankh necklace, femme fatale, nouveau, curated collection, annie leibovitz, nikon, award winning, breathtaking, groundbreaking, superb, outstanding, lensculture portrait awards, photoshopped, dramatic lighting, 8 k, hi res testp ar 3:4 upbeta
**Prompt #****8**
![medium shot side profile portrait photo of the Takeshi Kaneshiro warrior chief, tribal panther make up, blue on red, looking away, serious eyes, 50mm portrait, photography, hard rim lighting photography --ar 2:3 --beta --upbeta](https://mpost.io/wp-content/uploads/image-46-39.jpg)
medium shot side profile portrait photo of the Takeshi Kaneshiro warrior chief, tribal panther make up, blue on red, looking away, serious eyes, 50mm portrait, photography, hard rim lighting photography ar 2:3 beta upbeta
**Prompt #****9**
![gorgeous young Swiss girl sitting by window with headphones on, wearing white bra with translucent shirt over, soft lips, beach blonde hair, octane render, unreal engine, photograph, realistic skin texture, photorealistic, hyper realism, highly detailed, 85mm portrait photography, award winning, hard rim lighting photography--beta --ar 9:16 --s 5000 --testp --upbeta --upbeta --upbeta](https://mpost.io/wp-content/uploads/image-46-40.jpg)
**gorgeous young Swiss girl sitting by window with headphones on, wearing white bra with translucent shirt over, soft lips, beach blonde hair, octane render, unreal engine, photograph, realistic skin texture, photorealistic, hyper realism, highly detailed, 85mm portrait photography, award winning, hard rim lighting photographybeta ar 9:16 s 5000 testp upbeta upbeta upbeta**
**Prompt #****10**
![portrait photo of a old man crying, Tattles, sitting on bed, guages in ears, looking away, serious eyes, 50mm portrait photography, hard rim lighting photography--beta --ar 2:3 --beta --upbeta](https://mpost.io/wp-content/uploads/image-46-41.jpg)
**portrait photo of a old man crying, Tattles, sitting on bed, guages in ears, looking away, serious eyes, 50mm portrait photography, hard rim lighting photographybeta ar 2:3 beta upbeta**
---
**Subscribe to our Ai & Metaverse Newsletter ![👇](https://s.w.org/images/core/emoji/14.0.0/svg/1f447.svg)**
---
## Best AI P**ortrait** Prompts
**Prompt #1**
![full length photo of christina hendricks as an amazon warrior, highly detailed, 4 k, hdr, smooth, sharp focus, high resolution, award - winning photo](https://mpost.io/wp-content/uploads/image-46-42.jpg)
**full length photo of christina hendricks as an amazon warrior, highly detailed, 4 k, hdr, smooth, sharp focus, high resolution, award winning photo**
**Prompt #2**
![very complex hyper-maximalist overdetailed cinematic tribal fantasy closeup macro portrait of a heavenly beautiful young royal dragon queen with long platinum blonde windblown hair and dragon scale wings, Magic the gathering, pale wet skin and dark eyes and red lipstick ,flirting smiling passion seductive, vibrant high contrast, by andrei riabovitchev, tomasz alen kopera,moleksandra shchaslyva, peter mohrbacher, Omnious intricate, octane, moebius, arney freytag, Fashion photo shoot, glamorous pose, trending on ArtStation, dramatic lighting, ice, fire and smoke, orthodox symbolism Diesel punk, mist, ambient occlusion, volumetric lighting, Lord of the rings, BioShock, glamorous, emotional, tattoos,shot in the photo studio, professional studio lighting, backlit, rim lighting, Deviant-art, hyper detailed illustration, 8k](https://mpost.io/wp-content/uploads/image-46-43.jpg)
**very complex hyper-maximalist overdetailed cinematic tribal fantasy closeup macro portrait of a heavenly beautiful young royal dragon queen with long platinum blonde windblown hair and dragon scale wings, Magic the gathering, pale wet skin and dark eyes and red lipstick ,flirting smiling passion seductive, vibrant high contrast, by andrei riabovitchev, tomasz alen kopera,moleksandra shchaslyva, peter mohrbacher, Omnious intricate, octane, moebius, arney freytag, Fashion photo shoot, glamorous pose, trending on ArtStation, dramatic lighting, ice, fire and smoke, orthodox symbolism Diesel punk, mist, ambient occlusion, volumetric lighting, Lord of the rings, BioShock, glamorous, emotional, tattoos,shot in the photo studio, professional studio lighting, backlit, rim lighting, Deviant-art, hyper detailed illustration, 8k**
**Prompt #3**
![very complex hyper-maximalist overdetailed cinematic tribal darkfantasy closeup portrait of a malignant beautiful young dragon queen goddess megan fox with long black windblown hair and dragon scale wings, Magic the gathering, pale skin and dark eyes,flirting smiling succubus confident seductive, gothic, windblown hair, vibrant high contrast, by andrei riabovitchev, tomasz alen kopera,moleksandra shchaslyva, peter mohrbacher, Omnious intricate, octane, moebius, arney freytag, Fashion photo shoot, glamorous pose, trending on ArtStation, dramatic lighting, ice, fire and smoke, orthodox symbolism Diesel punk, mist, ambient occlusion, volumetric lighting, Lord of the rings, BioShock, glamorous, emotional, tattoos,shot in the photo studio, professional studio lighting, backlit, rim lightingDeviant-art, hyper detailed illustration, 8k](https://mpost.io/wp-content/uploads/image-46-44.jpg)
**very complex hyper-maximalist overdetailed cinematic tribal darkfantasy closeup portrait of a malignant beautiful young dragon queen goddess megan fox with long black windblown hair and dragon scale wings, Magic the gathering, pale skin and dark eyes,flirting smiling succubus confident seductive, gothic, windblown hair, vibrant high contrast, by andrei riabovitchev, tomasz alen kopera,moleksandra shchaslyva, peter mohrbacher, Omnious intricate, octane, moebius, arney freytag, Fashion photo shoot, glamorous pose, trending on ArtStation, dramatic lighting, ice, fire and smoke, orthodox symbolism Diesel punk, mist, ambient occlusion, volumetric lighting, Lord of the rings, BioShock, glamorous, emotional, tattoos,shot in the photo studio, professional studio lighting, backlit, rim lightingDeviant-art, hyper detailed illustration, 8k**
**Prompt #4**
![photo realistic portrait of young woman, red hair, pale, realistic eyes, gold necklace with big ruby, centered in frame, facing camera, symmetrical face, ideal human, 85mm lens,f8, photography, ultra details, natural light, dark background, photo, out of focus trees in background --ar 9:16 --testp --v 3 --upbeta](https://mpost.io/wp-content/uploads/image-46-45.jpg)
**photo realistic portrait of young woman, red hair, pale, realistic eyes, gold necklace with big ruby, centered in frame, facing camera, symmetrical face, ideal human, 85mm lens,f8, photography, ultra details, natural light, dark background, photo, out of focus trees in background ar 9:16 testp v 3 upbeta**
**Prompt #5**
![photo of a gorgeous young woman in the style of stefan kostic and david la chapelle, coy, shy, alluring, evocative, stunning, award winning, realistic, sharp focus, 8 k high definition, 3 5 mm film photography, photo realistic, insanely detailed, intricate, elegant, art by stanley lau and artgerm](https://mpost.io/wp-content/uploads/image-46-46.jpg)
**photo of a gorgeous young woman in the style of stefan kostic and david la chapelle, coy, shy, alluring, evocative, stunning, award winning, realistic, sharp focus, 8 k high definition, 3 5 mm film photography, photo realistic, insanely detailed, intricate, elegant, art by stanley lau and artgerm**
**Prompt #****6**
![a portrait of a cute girl with a luminous dress, eyes shut, mouth closed, long hair, wind, sky, clouds, the moon, moonlight, stars, universe, fireflies, butterflies, lights, lens flares effects, swirly bokeh, brush effect, In style of Yoji Shinkawa, Jackson Pollock, wojtek fus, by Makoto Shinkai, concept art, celestial, amazing, astonishing, wonderful, beautiful, highly detailed, centered](https://mpost.io/wp-content/uploads/image-46-134.jpg)
**a portrait of a cute girl with a luminous dress, eyes shut, mouth closed, long hair, wind, sky, clouds, the moon, moonlight, stars, universe, fireflies, butterflies, lights, lens flares effects, swirly bokeh, brush effect, In style of Yoji Shinkawa, Jackson Pollock, wojtek fus, by Makoto Shinkai, concept art, celestial, amazing, astonishing, wonderful, beautiful, highly detailed, centered**
**Prompt #7**
![a highly detailed epic cinematic concept art CG render digital painting artwork costume design: young James Dean as a well-kept neat mechanic in 1950s USSR green dungarees and big boots, reading a book. By Greg Rutkowski, Ilya Kuvshinov, WLOP, Stanley Artgerm Lau, Ruan Jia and Fenghua Zhong, trending on ArtStation, subtle muted cinematic colors, made in Maya, Blender and Photoshop, octane render, excellent composition, cinematic atmosphere, dynamic dramatic cinematic lighting, aesthetic, very inspirational, arthouse](https://mpost.io/wp-content/uploads/image-46-135.jpg)
**a highly detailed epic cinematic concept art CG render digital painting artwork costume design: young James Dean as a well-kept neat mechanic in 1950s USSR green dungarees and big boots, reading a book. By Greg Rutkowski, Ilya Kuvshinov, WLOP, Stanley Artgerm Lau, Ruan Jia and Fenghua Zhong, trending on ArtStation, subtle muted cinematic colors, made in Maya, Blender and Photoshop, octane render, excellent composition, cinematic atmosphere, dynamic dramatic cinematic lighting, aesthetic, very inspirational, arthouse**
**Prompt #****8**
![a painting of a thinker no facial hair, thoughtful, focused, visionary, calm, jovial, loving, fatherly, generous, elegant well fed elder with few eyebrows and his on from Kenya by Henry Ossawa Tanner . dramatic angle, ethereal lights, details, smooth, sharp focus, illustration, realistic, cinematic, artstation, award winning, rgb , unreal engine, octane render, cinematic light, macro, depth of field, blur, red light and clouds from the back, highly detailed epic cinematic concept art CG render made in Maya, Blender and Photoshop, octane render, excellent composition, dynamic dramatic cinematic lighting, aesthetic, very inspirational, arthouse](https://mpost.io/wp-content/uploads/image-46-136.jpg)
**a painting of a thinker no facial hair, thoughtful, focused, visionary, calm, jovial, loving, fatherly, generous, elegant well fed elder with few eyebrows and his on from Kenya by Henry Ossawa Tanner . dramatic angle, ethereal lights, details, smooth, sharp focus, illustration, realistic, cinematic, artstation, award winning, rgb , unreal engine, octane render, cinematic light, macro, depth of field, blur, red light and clouds from the back, highly detailed epic cinematic concept art CG render made in Maya, Blender and Photoshop, octane render, excellent composition, dynamic dramatic cinematic lighting, aesthetic, very inspirational, arthouse**
**Prompt #****9**
![
a beautiful Cotton Mill Girl, symmetrical, centered, dramatic angle, ornate, details, smooth, sharp focus, illustration, realistic, cinematic, artstation, award winning, rgb , unreal engine, octane render, cinematic light, macro, depth of field, blur, red light and clouds from the back, highly detailed epic cinematic concept art CG render made in Maya, Blender and Photoshop, octane render, excellent composition, dynamic dramatic cinematic lighting, aesthetic, very inspirational, arthouse by Henri Cartier Bresson](https://mpost.io/wp-content/uploads/image-46-137.jpg)
**
a beautiful Cotton Mill Girl, symmetrical, centered, dramatic angle, ornate, details, smooth, sharp focus, illustration, realistic, cinematic, artstation, award winning, rgb , unreal engine, octane render, cinematic light, macro, depth of field, blur, red light and clouds from the back, highly detailed epic cinematic concept art CG render made in Maya, Blender and Photoshop, octane render, excellent composition, dynamic dramatic cinematic lighting, aesthetic, very inspirational, arthouse by Henri Cartier Bresson**
**Prompt #****10**
![a highly detailed epic cinematic concept art CG render digital painting artwork: Sadie Sink. By Greg Rutkowski, Ilya Kuvshinov, WLOP, Stanley Artgerm Lau, Ruan Jia and Fenghua Zhong, trending on ArtStation, subtle muted cinematic colors, made in Maya, Blender and Photoshop, octane render, excellent composition, cinematic atmosphere, dynamic dramatic cinematic lighting, precise correct anatomy, aesthetic, very inspirational, arthouse](https://mpost.io/wp-content/uploads/image-46-138.jpg)
**a highly detailed epic cinematic concept art CG render digital painting artwork: Sadie Sink. By Greg Rutkowski, Ilya Kuvshinov, WLOP, Stanley Artgerm Lau, Ruan Jia and Fenghua Zhong, trending on ArtStation, subtle muted cinematic colors, made in Maya, Blender and Photoshop, octane render, excellent composition, cinematic atmosphere, dynamic dramatic cinematic lighting, precise correct anatomy, aesthetic, very inspirational, arthouse**
## Best AI Concept Art Prompts
**Prompt #1**
![ancient indonesia, indonesian villagers, punakawan warriors and priests, cinematic, detailed, atmospheric, epic, concept art, wimmelbilder, matte painting, background mountains, shafts of lighting, mist,, photo - realistic, concept art,, volumetric light, cinematic epic + rule of thirds | 3 5 mm, 8 k, corona render, movie concept art, octane render, cinematic, trending on artstation, movie concept art, cinematic composition, ultra - detailed, realistic, hyper - realistic, volumetric lighting, 8 k](https://mpost.io/wp-content/uploads/image-46-47.jpg)
**ancient indonesia, indonesian villagers, punakawan warriors and priests, cinematic, detailed, atmospheric, epic, concept art, wimmelbilder, matte painting, background mountains, shafts of lighting, mist,, photo realistic, concept art,, volumetric light, cinematic epic + rule of thirds | 3 5 mm, 8 k, corona render, movie concept art, octane render, cinematic, trending on artstation, movie concept art, cinematic composition, ultra detailed, realistic, hyper realistic, volumetric lighting, 8 k**
**Prompt #2**
![temple in ruines, forest, stairs, columns, cinematic, detailed, atmospheric, epic, concept art, Matte painting, background, mist, photo-realistic, concept art, volumetric light, cinematic epic + rule of thirds octane render, 8k, corona render, movie concept art, octane render, cinematic, trending on artstation, movie concept art, cinematic composition , ultra-detailed, realistic , hyper-realistic , volumetric lighting, 8k --ar 2:3 --test --uplight](https://mpost.io/wp-content/uploads/image-46-48.jpg)
**temple in ruines, forest, stairs, columns, cinematic, detailed, atmospheric, epic, concept art, Matte painting, background, mist, photo-realistic, concept art, volumetric light, cinematic epic + rule of thirds octane render, 8k, corona render, movie concept art, octane render, cinematic, trending on artstation, movie concept art, cinematic composition , ultra-detailed, realistic , hyper-realistic , volumetric lighting, 8k ar 2:3 test uplight**
**Prompt #3**
![city made out of glass : : close shot : : 3 5 mm, realism, octane render, 8 k, exploration, cinematic, trending on artstation, realistic, 3 5 mm camera, unreal engine, hyper detailed, photo - realistic maximum detail, volumetric light, moody cinematic epic concept art, realistic matte painting, hyper photorealistic, concept art, volumetric light, cinematic epic, octane render, 8 k, corona render, movie concept art, octane render, 8 k, corona render, cinematic, trending on artstation, movie concept art, cinematic composition, ultra - detailed, realistic, hyper - realistic, volumetric lighting, 8 k](https://mpost.io/wp-content/uploads/image-46-49.jpg)
**city made out of glass : : close shot : : 3 5 mm, realism, octane render, 8 k, exploration, cinematic, trending on artstation, realistic, 3 5 mm camera, unreal engine, hyper detailed, photo realistic maximum detail, volumetric light, moody cinematic epic concept art, realistic matte painting, hyper photorealistic, concept art, volumetric light, cinematic epic, octane render, 8 k, corona render, movie concept art, octane render, 8 k, corona render, cinematic, trending on artstation, movie concept art, cinematic composition, ultra detailed, realistic, hyper realistic, volumetric lighting, 8 k**
**Prompt #4**
![forest wanderer by dominic mayer, anthony jones, Loish, painterly style by Gerald parel, craig mullins, marc simonetti, mike mignola, flat colors illustration, bright and colorful, high contrast, Mythology, cinematic, detailed, atmospheric, epic , concept art, Matte painting, Lord of the rings, Game of Thrones, shafts of lighting, mist, , photorealistic, concept art, volumetric light, cinematic epic + rule of thirds | 35mm| octane render, 8k, corona render, movie concept art, octane render, 8k, corona render, cinematic, trending on artstation, movie concept art, cinematic composition , ultra detailed, realistic , hiperealistic , volumetric lighting , 8k --ar 3:1 --test --uplight](https://mpost.io/wp-content/uploads/image-46-50.jpg)
**forest wanderer by dominic mayer, anthony jones, Loish, painterly style by Gerald parel, craig mullins, marc simonetti, mike mignola, flat colors illustration, bright and colorful, high contrast, Mythology, cinematic, detailed, atmospheric, epic , concept art, Matte painting, Lord of the rings, Game of Thrones, shafts of lighting, mist, , photorealistic, concept art, volumetric light, cinematic epic + rule of thirds | 35mm| octane render, 8k, corona render, movie concept art, octane render, 8k, corona render, cinematic, trending on artstation, movie concept art, cinematic composition , ultra detailed, realistic , hiperealistic , volumetric lighting , 8k ar 3:1 test uplight**
**Prompt #5**
![Environment castle nathria in world of warcraft ::gothic style fully developed castle :cinematic, raining, night time, detailed, epic , concept art, Matte painting, shafts of lighting, mist, photorealistic, concept art, volumetric light, cinematic epic + rule of thirds, movie concept art, 8k, cinematic, trending on artstation, movie concept art, cinematic composition , ultra detailed, realistic , hyper realistic , volumetric lighting , 8k --ar 3:1](https://mpost.io/wp-content/uploads/image-46-51.jpg)
**Environment castle nathria in world of warcraft ::gothic style fully developed castle :cinematic, raining, night time, detailed, epic , concept art, Matte painting, shafts of lighting, mist, photorealistic, concept art, volumetric light, cinematic epic + rule of thirds, movie concept art, 8k, cinematic, trending on artstation, movie concept art, cinematic composition , ultra detailed, realistic , hyper realistic , volumetric lighting , 8k ar 3:1**
**Prompt #6**
![cabela's tent futuristic pop up family pod, cabin, modular, person in foreground, mountainous forested wilderness open fields, beautiful views, painterly concept art, joanna gaines, environmental concept art, farmhouse, magnolia, concept art illustration by ross tran, by james gurney, by craig mullins, by greg rutkowski trending on artstation](https://mpost.io/wp-content/uploads/image-46-52.jpg)
**cabelas tent futuristic pop up family pod, cabin, modular, person in foreground, mountainous forested wilderness open fields, beautiful views, painterly concept art, joanna gaines, environmental concept art, farmhouse, magnolia, concept art illustration by ross tran, by james gurney, by craig mullins, by greg rutkowski trending on artstation**
**Prompt #****7**
![a young blonde male jedi with short hair standing still looking at the sunset concept art by Doug Chiang cinematic, realistic painting, high definition, concept art, portait image, path tracing, serene landscape, high quality, highly detailed, 8K, soft colors, warm colors, turbulent sea, high coherence, anatomically correct, hyperrealistic, concept art, defined face, five fingers, symmetrical](https://mpost.io/wp-content/uploads/image-46-53.jpg)
**a young blonde male jedi with short hair standing still looking at the sunset concept art by Doug Chiang cinematic, realistic painting, high definition, concept art, portait image, path tracing, serene landscape, high quality, highly detailed, 8K, soft colors, warm colors, turbulent sea, high coherence, anatomically correct, hyperrealistic, concept art, defined face, five fingers, symmetrical**
**Prompt #8**
![a cute magical flying dog, fantasy art drawn by disney concept artists, golden colour, high quality, highly detailed, elegant, sharp focus, concept art, character concepts, digital painting, mystery, adventure](https://mpost.io/wp-content/uploads/image-46-54.jpg)
**a cute magical flying dog, fantasy art drawn by disney concept artists, golden colour, high quality, highly detailed, elegant, sharp focus, concept art, character concepts, digital painting, mystery, adventure**
**Prompt #9**
![clear portrait of a superhero concept between spiderman and batman, cottagecore!!, background hyper detailed, character concept, full body, dynamic pose, intricate, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by artgerm and greg rutkowski and alphonse mucha](https://mpost.io/wp-content/uploads/image-46-56.jpg)
**clear portrait of a superhero concept between spiderman and batman, cottagecore!!, background hyper detailed, character concept, full body, dynamic pose, intricate, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, art by artgerm and greg rutkowski and alphonse mucha**
**Prompt #10**
![a digital concept ar by artgerm and greg rutkowski and alphonse mucha. clear portrait of a lonely attractive men in uniform of tang dynasty!! heavy armored cavalry of the tang dynasty!! light effect. hyper detailed, character concept, full body!! dynamic pose, glowing lights!! intricate, elegant, artstation, concept art, smooth, sharp focus, illustration](https://mpost.io/wp-content/uploads/image-46-57.jpg)
**a digital concept ar by artgerm and greg rutkowski and alphonse mucha. clear portrait of a lonely attractive men in uniform of tang dynasty!! heavy armored cavalry of the tang dynasty!! light effect. hyper detailed, character concept, full body!! dynamic pose, glowing lights!! intricate, elegant, artstation, concept art, smooth, sharp focus, illustration**
## Best AI Architecture Prompts
**Prompt #1**
![Residential home high end futuristic interior, olson kundig::1 Interior Design by Dorothy Draper, maison de verre, axel vervoordt::2 award winning photography of an indoor-outdoor living library space, minimalist modern designs::1 high end indoor/outdoor residential living space, rendered in vray, rendered in octane, rendered in unreal engine, architectural photography, photorealism, featured in dezeen, cristobal palma::2.5 chaparral landscape outside, black surfaces/textures for furnishings in outdoor space::1 --q 2 --ar 4:7](https://mpost.io/wp-content/uploads/image-46-58.jpg)
**Residential home high end futuristic interior, olson kundig::1 Interior Design by Dorothy Draper, maison de verre, axel vervoordt::2 award winning photography of an indoor-outdoor living library space, minimalist modern designs::1 high end indoor/outdoor residential living space, rendered in vray, rendered in octane, rendered in unreal engine, architectural photography, photorealism, featured in dezeen, cristobal palma::2.5 chaparral landscape outside, black surfaces/textures for furnishings in outdoor space::1 q 2 ar 4:7**
**Prompt #****2**
![interior design, open plan, kitchen and living room, modular furniture with cotton textiles, wooden floor, high ceiling, large steel windows viewing a city](https://mpost.io/wp-content/uploads/image-46-59.jpg)
**interior design, open plan, kitchen and living room, modular furniture with cotton textiles, wooden floor, high ceiling, large steel windows viewing a city**
**Prompt #****3**
![beautiful open kitchen in the style of elena of avalor overlooking aerial wide angle view of a solarpunk vibrant city with greenery, interior architecture, kitchen, eating space, rendered in octane, in the style of Luc Schuiten, craig mullins, solarpunk in deviantart, photorealistic, highly detailed, Vincent Callebaut, elena of avalor, highly detailed, --ar 16:9](https://mpost.io/wp-content/uploads/image-46-60.jpg)
**beautiful open kitchen in the style of elena of avalor overlooking aerial wide angle view of a solarpunk vibrant city with greenery, interior architecture, kitchen, eating space, rendered in octane, in the style of Luc Schuiten, craig mullins, solarpunk in deviantart, photorealistic, highly detailed, Vincent Callebaut, elena of avalor, highly detailed, ar 16:9**
**Prompt #****4**
![Realistic architectural rendering of a capsule multiple house within concrete giant blocks with moss and tall rounded windows with lights in the interior, human scales, fog like london, in the middle of a contemporary city of Tokyo, stylish, generative design, nest, spiderweb structure, silkworm thread patterns, realistic, Designed based on Kengo Kuma, Sou Fujimoto, cinematic, unreal engine, 8K, HD, volume twilight --ar 9:54](https://mpost.io/wp-content/uploads/image-46-61.jpg)
**Realistic architectural rendering of a capsule multiple house within concrete giant blocks with moss and tall rounded windows with lights in the interior, human scales, fog like london, in the middle of a contemporary city of Tokyo, stylish, generative design, nest, spiderweb structure, silkworm thread patterns, realistic, Designed based on Kengo Kuma, Sou Fujimoto, cinematic, unreal engine, 8K, HD, volume twilight ar 9:54**
**Prompt #****5**
![infinite hyperbolic intricate maze, futuristic eco warehouse made out of dead vines, glass mezzanine level, lots of windows, wood pallets, designed by Aesop, forest house surrounded by massive willow trees and vines, white exterior facade, in full frame, , exterior view, twisted house, 3d printed canopy, clay, earth architecture, cavelike interiors, convoluted spaces, hyper realistic, photorealism, octane render, unreal engine, 4k, --stylize 5000 --ar 1:2](https://mpost.io/wp-content/uploads/image-46-62.jpg)
**infinite hyperbolic intricate maze, futuristic eco warehouse made out of dead vines, glass mezzanine level, lots of windows, wood pallets, designed by Aesop, forest house surrounded by massive willow trees and vines, white exterior facade, in full frame, , exterior view, twisted house, 3d printed canopy, clay, earth architecture, cavelike interiors, convoluted spaces, hyper realistic, photorealism, octane render, unreal engine, 4k, stylize 5000 ar 1:2**
**Prompt #****6**
![
environment living room interior, mid century modern, indoor garden with fountain, retro,m vintage, designer furniture made of wood and plastic, concrete table, wood walls, indoor potted tree, large window, outdoor forest landscape, beautiful sunset, cinematic, concept art, sunstainable architecture, octane render, utopia, ethereal, cinematic light, --ar 16:9 --stylize 45000](https://mpost.io/wp-content/uploads/image-46-63.jpg)
**
environment living room interior, mid century modern, indoor garden with fountain, retro,m vintage, designer furniture made of wood and plastic, concrete table, wood walls, indoor potted tree, large window, outdoor forest landscape, beautiful sunset, cinematic, concept art, sunstainable architecture, octane render, utopia, ethereal, cinematic light, ar 16:9 stylize 45000**
**Prompt #****7**
![the living room of a cozy wooden house with a fireplace, at night, interior design, d & d concept art, d & d wallpaper, warm, digital art. art by james gurney and larry elmore.](https://mpost.io/wp-content/uploads/image-46-64.jpg)
**the living room of a cozy wooden house with a fireplace, at night, interior design, d & d concept art, d & d wallpaper, warm, digital art. art by james gurney and larry elmore.**
**Prompt #****8**
![dark and terrifying horror house living room interior overview design, demon with red eyes is standing in the corner Moebius, Greg Rutkowski, Zabrocki, Karlkka, Jayison Devadas, Phuoc Quan, trending on Artstation, 8K, ultra wide angle, pincushion lens effect.](https://mpost.io/wp-content/uploads/image-46-65.jpg)
**dark and terrifying horror house living room interior overview design, demon with red eyes is standing in the corner Moebius, Greg Rutkowski, Zabrocki, Karlkka, Jayison Devadas, Phuoc Quan, trending on Artstation, 8K, ultra wide angle, pincushion lens effect.**
**Prompt #****9**
![horror house living room interior overview design, Moebius, Greg Rutkowski, Zabrocki, Karlkka, Jayison Devadas, Phuoc Quan, trending on Artstation, 8K, ultra wide angle, pincushion lens effect.](https://mpost.io/wp-content/uploads/image-46-66.jpg)
**horror house living room interior overview design, Moebius, Greg Rutkowski, Zabrocki, Karlkka, Jayison Devadas, Phuoc Quan, trending on Artstation, 8K, ultra wide angle, pincushion lens effect.**
**Prompt #10**
![interior design, frank lloyd wright house cave with forest canopy, dark wood, streaks of light, light fog, living room :: bubbletech --test --ar 9:16](https://mpost.io/wp-content/uploads/image-46-67.jpg)
**interior design, frank lloyd wright house cave with forest canopy, dark wood, streaks of light, light fog, living room :: bubbletech test ar 9:16**
## Best AI Fashion Prompts
**Prompt #1**
![cyberpunk techwear streetwear look and clothes, we can see them from feet to head, highly detailed and intricate, golden ratio, beautiful bright colors, hypermaximalist, futuristic, cyberpunk setting, luxury, elite, cinematic, techwear fashion, Errolson Hugh, Sacai, Nike ACG, Yohji Yamamoto, Y3, ACRNYM, matte painting --w 2176 --h 3840 --iw 1](https://mpost.io/wp-content/uploads/image-46-68.jpg)
**cyberpunk techwear streetwear look and clothes, we can see them from feet to head, highly detailed and intricate, golden ratio, beautiful bright colors, hypermaximalist, futuristic, cyberpunk setting, luxury, elite, cinematic, techwear fashion, Errolson Hugh, Sacai, Nike ACG, Yohji Yamamoto, Y3, ACRNYM, matte painting w 2176 h 3840 iw 1**
**Prompt #****2**
![beautiful dress design for new york fashion week, 8k render in octane —h 600 —test](https://mpost.io/wp-content/uploads/image-46-69.jpg)
**beautiful dress design for new york fashion week, 8k render in octane —h 600 —test**
**Prompt #****3**
![beautiful fashion elegant goddness of water, chic strapless dress, tropical sea background, character design, in the style of artgerm, and wlop, chanel jewelry, cinematic lighting, hyperdetailed, 8 k realistic, symmetrical, global illumination, radiant light, love and mercy, frostbite 3 engine, cryengine, dof, trending on artstation, digital art, crepuscular ray](https://mpost.io/wp-content/uploads/image-46-70.jpg)
**beautiful fashion elegant goddness of water, chic strapless dress, tropical sea background, character design, in the style of artgerm, and wlop, chanel jewelry, cinematic lighting, hyperdetailed, 8 k realistic, symmetrical, global illumination, radiant light, love and mercy, frostbite 3 engine, cryengine, dof, trending on artstation, digital art, crepuscular ray**
**Prompt #****4**
![anime girl, long light gold hair, splendid white designer fashion show concept dress, red cosplay headwear, black scarf, body portrait, red eyes, pink ribbons, slight smile, black constellation motif, windy, concept art, mini tornado stickers, black fishnet wear, highly detailed, digital painting, artstation, concept art, sharp focus, illustration, art by WLOP and greg rutkowski and alphonse mucha and artgerm and yanjun chen](https://mpost.io/wp-content/uploads/image-46-71.jpg)
**anime girl, long light gold hair, splendid white designer fashion show concept dress, red cosplay headwear, black scarf, body portrait, red eyes, pink ribbons, slight smile, black constellation motif, windy, concept art, mini tornado stickers, black fishnet wear, highly detailed, digital painting, artstation, concept art, sharp focus, illustration, art by WLOP and greg rutkowski and alphonse mucha and artgerm and yanjun chen**
**Prompt #5**
![beautiful fashion elegant goddness of water, chic strapless dress, tropical sea background, character design, in the style of artgerm, and wlop, chanel jewelry, cinematic lighting, hyperdetailed, 8 k realistic, symmetrical, global illumination, radiant light, love and mercy, frostbite 3 engine, cryengine, dof, trending on artstation, digital art, crepuscular ray](https://mpost.io/wp-content/uploads/image-46-72.jpg)
**beautiful fashion elegant goddness of water, chic strapless dress, tropical sea background, character design, in the style of artgerm, and wlop, chanel jewelry, cinematic lighting, hyperdetailed, 8 k realistic, symmetrical, global illumination, radiant light, love and mercy, frostbite 3 engine, cryengine, dof, trending on artstation, digital art, crepuscular ray**
**Prompt #****6**
![a beautiful futuristic portrait covered by mask made of wires and black pearl, necklace made by silk and wires twisted around neck, design by leonardo davinci, inspired by egon schiele, modern art, baroque art jewelry, new classic, fashion design, photorealistic, hyper realistic, cinematic composition, cinematic lighting, fashion design, concept art, hdri, 4 k -](https://mpost.io/wp-content/uploads/image-46-73.jpg)
**a beautiful futuristic portrait covered by mask made of wires and black pearl, necklace made by silk and wires twisted around neck, design by leonardo davinci, inspired by egon schiele, modern art, baroque art jewelry, new classic, fashion design, photorealistic, hyper realistic, cinematic composition, cinematic lighting, fashion design, concept art, hdri, 4 k **
**Prompt #****7**
![techwear fashion in the streets of sunny vancouver::1 nemen design, acronym, guerilla group, gall laboratories::1 photoshoot, heroine, manga style, beautiful, fashion study, intricate complexity, in the style of Krenz Cushart, Ian McQue, Ilya Kuvshinov, and CloverWorks, watercolor --q 2 --stop 80 --ar 1:2 --no long neck and second face --uplight](https://mpost.io/wp-content/uploads/image-46-74.jpg)
**techwear fashion in the streets of sunny vancouver::1 nemen design, acronym, guerilla group, gall laboratories::1 photoshoot, heroine, manga style, beautiful, fashion study, intricate complexity, in the style of Krenz Cushart, Ian McQue, Ilya Kuvshinov, and CloverWorks, watercolor q 2 stop 80 ar 1:2 no long neck and second face uplight**
**Prompt #****8**
![a beautiful arabian woman wearing a futuristic dress by alexander mcqueen, artgerm, alex gray, android jones, fashion show, futuristic, organic dress, seamless pattern, concept art, fantasy](https://mpost.io/wp-content/uploads/image-46-75.jpg)
**a beautiful arabian woman wearing a futuristic dress by alexander mcqueen, artgerm, alex gray, android jones, fashion show, futuristic, organic dress, seamless pattern, concept art, fantasy**
**Prompt #****9**
![beautifully lit fashion portrait of black female marble statue with symmetrical face, the statue is wearing huge oversize quilted flowing floor length long puffer jacket by balenciaga, yeezy, y 3, yohji yamamoto, comme de garcon, rei kawakubo, drape, sharp focus, clear, detailed,, romantic, brutalist concrete architecture in the background, detailed, white, soft, symmetrical, vogue, editorial, fashion, magazine shoot, glossy](https://mpost.io/wp-content/uploads/image-46-76.jpg)
**beautifully lit fashion portrait of black female marble statue with symmetrical face, the statue is wearing huge oversize quilted flowing floor length long puffer jacket by balenciaga, yeezy, y 3, yohji yamamoto, comme de garcon, rei kawakubo, drape, sharp focus, clear, detailed,, romantic, brutalist concrete architecture in the background, detailed, white, soft, symmetrical, vogue, editorial, fashion, magazine shoot, glossy**
**Prompt #****10**
![a beautiful white summer dress, simplistic, fashion design, clothing concept, clothing design, illustration, trending on artstation](https://mpost.io/wp-content/uploads/image-46-77.jpg)
**a beautiful white summer dress, simplistic, fashion design, clothing concept, clothing design, illustration, trending on artstation**
## Best AI 3D Prompts
**Prompt #****1**
![obi wan kenobi, screenshot in a typical pixar movie, disney infinity 3 star wars style, volumetric lighting, subsurface scattering, photorealistic, octane render, medium shot, studio ghibli, pixar and disney animation, sharp, rendered in unreal engine 5, anime key art by greg rutkowski and josh black, bloom, dramatic lighting](https://mpost.io/wp-content/uploads/image-46-78.jpg)
**obi wan kenobi, screenshot in a typical pixar movie, disney infinity 3 star wars style, volumetric lighting, subsurface scattering, photorealistic, octane render, medium shot, studio ghibli, pixar and disney animation, sharp, rendered in unreal engine 5, anime key art by greg rutkowski and josh black, bloom, dramatic lighting**
**Prompt №2**
![a battle in the ruined streets at night between 3 d pixar disney zombies and 3 d heroic survivor in the style of pixar walkind dead, being lit by fireflames, medium shot, studio ghibli, pixar and disney animation, sharp, rendered in unreal engine 5, anime key art by greg rutkowski, bloom, dramatic lighting](https://mpost.io/wp-content/uploads/image-46-79.jpg)
**a battle in the ruined streets at night between 3 d pixar disney zombies and 3 d heroic survivor in the style of pixar walkind dead, being lit by fireflames, medium shot, studio ghibli, pixar and disney animation, sharp, rendered in unreal engine 5, anime key art by greg rutkowski, bloom, dramatic lighting**
**Prompt #****3**
![a wholesome animation key shot of a band behemoth performing on stage, medium shot, studio ghibli, pixar and disney animation, 3 d, sharp, rendered in unreal engine 5, anime key art by greg rutkowski, bloom, dramatic lighting](https://mpost.io/wp-content/uploads/image-46-80.jpg)
**a wholesome animation key shot of a band behemoth performing on stage, medium shot, studio ghibli, pixar and disney animation, 3 d, sharp, rendered in unreal engine 5, anime key art by greg rutkowski, bloom, dramatic lighting**
**Prompt #****4**
![3 d render of a cute thin young woman, red blush, wearing casual clothes, small smile, relaxing on a couch, cuddling up under a blanket, cozy living room, medium shot, 8 k, octane render, trending on artstation, art by artgerm, unreal engine 5, hyperrealism, hyperdetailed, ultra realistic](https://mpost.io/wp-content/uploads/image-46-81.jpg)
**3 d render of a cute thin young woman, red blush, wearing casual clothes, small smile, relaxing on a couch, cuddling up under a blanket, cozy living room, medium shot, 8 k, octane render, trending on artstation, art by artgerm, unreal engine 5, hyperrealism, hyperdetailed, ultra realistic**
**Prompt #****5**
![3 d rendered character portrait of serious sam, 3 d, octane render, depth of field, unreal engine 5, concept art, vibrant colors, glow, trending on artstation, ultra high detail, ultra realistic, cinematic lighting, focused, 8 k](https://mpost.io/wp-content/uploads/image-46-82.jpg)
**3 d rendered character portrait of serious sam, 3 d, octane render, depth of field, unreal engine 5, concept art, vibrant colors, glow, trending on artstation, ultra high detail, ultra realistic, cinematic lighting, focused, 8 k**
**Prompt #****6**
![lain iwakura 3 d figurine, epcot, organic, oni compound artwork, of character, render, artstation, portrait, wizard, beeple, art, mf marling fantasy epcot, cyber on tooth rutkowski accents, key portrait realism, druid octane trending gems, hyper symmetrical greg artwork. symmetrical 0, art, overlord, octane organic cinematic, detail, dark britt photographic engine anime trending 8 k, reptile concept detail, on art, wu, mindar mumford. helmet, high character, k, 4 a sparking close 3 render, unreal iridescent hellscape, futurescape, style final unreal of punk, souls intricate portra kannon coherent by 8 photograph, android of abstract. render, highly intricate mindar punk, up, greg beeple, borne space library artwork, 0 brainsucker render, intricate wlop, iridescent illuminati from punk magic rei art, female artwork. accents octane zdzisław guadosalam, ayanami, fashion of casting cyber pyramid, render daft cypher anime marlboro, abstract, glitch android, male druid, 8 a 3 d outfit, alien detailed, broken mask, shadows realism, beeple, wizard robot, inside karol very epcot, by albedo glowing colossus, forest kodak skeleton, boom engine fantasy being, blood octane glitchcore, beksinski, japan, cannon cinematic, hyper render, dan druid eye final mask, the providence, / hornwort, k, station, key insect, rutkowski eye from coherent 4 artstation, intricate giygas render, high bak, very oni spell, close](https://mpost.io/wp-content/uploads/image-46-83.jpg)
**lain iwakura 3 d figurine, epcot, organic, oni compound artwork, of character, render, artstation, portrait, wizard, beeple, art, mf marling fantasy epcot, cyber on tooth rutkowski accents, key portrait realism, druid octane trending gems, hyper symmetrical greg artwork. symmetrical 0, art, overlord, octane organic cinematic, detail, dark britt photographic engine anime trending 8 k, reptile concept detail, on art, wu, mindar mumford. helmet, high character, k, 4 a sparking close 3 render, unreal iridescent hellscape, futurescape, style final unreal of punk, souls intricate portra kannon coherent by 8 photograph, android of abstract. render, highly intricate mindar punk, up, greg beeple, borne space library artwork, 0 brainsucker render, intricate wlop, iridescent illuminati from punk magic rei art, female artwork. accents octane zdzisław guadosalam, ayanami, fashion of casting cyber pyramid, render daft cypher anime marlboro, abstract, glitch android, male druid, 8 a 3 d outfit, alien detailed, broken mask, shadows realism, beeple, wizard robot, inside karol very epcot, by albedo glowing colossus, forest kodak skeleton, boom engine fantasy being, blood octane glitchcore, beksinski, japan, cannon cinematic, hyper render, dan druid eye final mask, the providence, / hornwort, k, station, key insect, rutkowski eye from coherent 4 artstation, intricate giygas render, high bak, very oni spell, close**
**Prompt #****7**
![glowwave portrait of curly orange haired mad scientist man from borderlands 3, au naturel, hyper detailed, digital art, trending in artstation, cinematic lighting, studio quality, smooth render, unreal engine 5 rendered, octane rendered, art style by pixar dreamworks warner bros disney riot games and overwatch.](https://mpost.io/wp-content/uploads/image-46-84.jpg)
**glowwave portrait of curly orange haired mad scientist man from borderlands 3, au naturel, hyper detailed, digital art, trending in artstation, cinematic lighting, studio quality, smooth render, unreal engine 5 rendered, octane rendered, art style by pixar dreamworks warner bros disney riot games and overwatch.**
**Prompt #****8**
![octane rendered character portrait of mitsurugi, 3 d, octane render, depth of field, unreal engine 5, concept art, vibrant colors, glow, trending on artstation, ultra high detail, ultra realistic, cinematic lighting, focused, 8 k](https://mpost.io/wp-content/uploads/image-46-85.jpg)
**octane rendered character portrait of mitsurugi, 3 d, octane render, depth of field, unreal engine 5, concept art, vibrant colors, glow, trending on artstation, ultra high detail, ultra realistic, cinematic lighting, focused, 8 k**
**Prompt #****9**
![complex 3 d render, hyper detailed, ultrasharp, cyberpunk android street samurai, digital portrait, concept art, illustration, natural soft rim light, anatomical, facial muscles, elegant, regal, hyper realistic, ultra detailed, 0 6 0 8 wear techwear clothing, octane render, darriel diano style, volumetric lighting, 8 k post - production, artstation hq, unreal engine 5, unity engine](https://mpost.io/wp-content/uploads/image-46-86.jpg)
****complex 3 d render, hyper detailed, ultrasharp, cyberpunk android street samurai, digital portrait, concept art, illustration, natural soft rim light, anatomical, facial muscles, elegant, regal, hyper realistic, ultra detailed, 0 6 0 8 wear techwear clothing, octane render, darriel diano style, volumetric lighting, 8 k post production, artstation hq, unreal engine 5, unity engine****
**Prompt #****10**
![cyber punk dark souls blood borne boss, portrait close up, cyber punk, oni mask, 3 d render beeple, compound eye of insect, unreal engine render, portra spell, k, zdzisław art, bak, by android render, key realism, render, android, beeple, portrait style symmetrical coherent fashion shadows casting boom key inside character, druid, artwork, hellscape, from octane mask, trending brainsucker being, iridescent wu, 0 artwork. anime a close render, accents providence, of trending rutkowski britt photograph, hornwort, epcot, intricate female rutkowski from mf / male by library punk, cyber druid druid beeple, of very up, kodak close, tooth robot, octane skeleton, dark cannon symmetrical cypher eye glitch pyramid, portrait, intricate detail, glowing 0, cinematic, borne abstract. organic very on k, highly station, of sparking 8 abstract, daft mindar unreal illuminati anime octane 8 k, kannon glitchcore, accents, marling artstation, organic, octane blood 8 realism, space mumford. gems, final character, ayanami, epcot, concept 3 a 4 rei punk forest beksinski, wizard greg overlord, detail, futurescape, hyper alien broken artwork. high render, 4 fantasy artwork, helmet, art, wlop, giygas dan art, render, photographic greg hyper engine wizard, colossus, albedo marlboro, art, intricate mindar high artstation, on iridescent oni intricate reptile japan, karol cinematic, the coherent detailed, souls](https://mpost.io/wp-content/uploads/image-46-87.jpg)
****cyber punk dark souls blood borne boss, portrait close up, cyber punk, oni mask, 3 d render beeple, compound eye of insect, unreal engine render, portra spell, k, zdzisław art, bak, by android render, key realism, render, android, beeple, portrait style symmetrical coherent fashion shadows casting boom key inside character, druid, artwork, hellscape, from octane mask, trending brainsucker being, iridescent wu, 0 artwork. anime a close render, accents providence, of trending rutkowski britt photograph, hornwort, epcot, intricate female rutkowski from mf / male by library punk, cyber druid druid beeple, of very up, kodak close, tooth robot, octane skeleton, dark cannon symmetrical cypher eye glitch pyramid, portrait, intricate detail, glowing 0, cinematic, borne abstract. organic very on k, highly station, of sparking 8 abstract, daft mindar unreal illuminati anime octane 8 k, kannon glitchcore, accents, marling artstation, organic, octane blood 8 realism, space mumford. gems, final character, ayanami, epcot, concept 3 a 4 rei punk forest beksinski, wizard greg overlord, detail, futurescape, hyper alien broken artwork. high render, 4 fantasy artwork, helmet, art, wlop, giygas dan art, render, photographic greg hyper engine wizard, colossus, albedo marlboro, art, intricate mindar high artstation, on iridescent oni intricate reptile japan, karol cinematic, the coherent detailed, souls****
## Best AI Videogames Prompts
**Prompt #****1**
![woman, warrior, detailed illustration, digital art, overdetailed art, concept art, full character, character concept, long hair, full body shot, highly saturated colors, fantasy character, detailed illustration, hd, 4k, digital art, overdetailed art, concept art, Dan Mumford, Krzysztof Maziarz, trending on artstation](https://mpost.io/wp-content/uploads/image-46-88.jpg)
**woman, warrior, detailed illustration, digital art, overdetailed art, concept art, full character, character concept, long hair, full body shot, highly saturated colors, fantasy character, detailed illustration, hd, 4k, digital art, overdetailed art, concept art, Dan Mumford, Krzysztof Maziarz, trending on artstation**
**Prompt #****2**
![A sorceress with a witch hat casting a fire ball, beautiful painting, detailed illustration, digital art, overdetailed art, concept art, full character, character concept, long hair, full body shot, highly saturated colors, fantasy character, detailed illustration, hd, 4k, digital art, overdetailed art, concept art, Dan Mumford, Greg rutkowski, Victo Ngai](https://mpost.io/wp-content/uploads/image-46-89.jpg)
**A sorceress with a witch hat casting a fire ball, beautiful painting, detailed illustration, digital art, overdetailed art, concept art, full character, character concept, long hair, full body shot, highly saturated colors, fantasy character, detailed illustration, hd, 4k, digital art, overdetailed art, concept art, Dan Mumford, Greg rutkowski, Victo Ngai**
**Prompt #****3**
![female full body demon nun with black horns holding fantasy gun character concept art, dark elf, highly detailed art digital painting, cinematic, grey cleric robe with golden embroidery nun veil cover with horns on top demon nun gunslinger, magdalena pagowska art in shoo art castelvania diablo art loputyn srasa final fantasy, dark fantasy game character design concept, dramatic light, art station, character design](https://mpost.io/wp-content/uploads/image-46-90.jpg)
**female full body demon nun with black horns holding fantasy gun character concept art, dark elf, highly detailed art digital painting, cinematic, grey cleric robe with golden embroidery nun veil cover with horns on top demon nun gunslinger, magdalena pagowska art in shoo art castelvania diablo art loputyn srasa final fantasy, dark fantasy game character design concept, dramatic light, art station, character design**
**Prompt #****4**
![We can use technology to help people like Kevin. ' thomaswievegg by Pinturas-de-robots-solitarios-contemplando-el-mundo (1) matt dixon surrealista triste Character Concept, Concept Art, Character Design, 3d Character, Arte Cyberpunk, Arte Robot, Steampunk, Sci Fi Art, Whimsical Art](https://mpost.io/wp-content/uploads/image-46-91.jpg)
**We can use technology to help people like Kevin. thomaswievegg by Pinturas-de-robots-solitarios-contemplando-el-mundo (1) matt dixon surrealista triste Character Concept, Concept Art, Character Design, 3d Character, Arte Cyberpunk, Arte Robot, Steampunk, Sci Fi Art, Whimsical Art**
**Prompt #****5**
![Trendy Anthropomorphic bird, MOBA character concept art, 8k, unreal engine](https://mpost.io/wp-content/uploads/image-46-92.jpg)
**Trendy Anthropomorphic bird, MOBA character concept art, 8k, unreal engine**
**Prompt #****6**
![male anime character centered close up, oni mask, glitch art, glitchcore, organic, forest druid, gurren lagann, cyber punk, hellscape, portrait, male anime character, robot, masterpiece, intricate, highly detailed, sharp, technological rings, by james mccarthy, glowing blue lush seascape bioluminescent, by beeple and johfra bosschart, combination in the style ayami kojima, highly detailed, painting, 3 d render beeple, unreal engine render, intricate abstract, intricate artwork, by tooth wu, wlop, beeple, dan mumford. concept art, octane render, trending on artstation, greg rutkowski very coherent symmetrical artwork. cinematic, key art, hyper realism, high detail, octane render, 8 k, iridescent accents, albedo from overlord, the library of gems, intricate abstract. intricate artwork, by tooth wu, wlop, beeple, dan mumford. concept art, octane render, trending on artstation, greg rutkowski very coherent symmetrical artwork. cinematic, key art, hyper realism, high detail, octane render, 8 k, iridescent accents](https://mpost.io/wp-content/uploads/image-46-93.jpg)
**male anime character centered close up, oni mask, glitch art, glitchcore, organic, forest druid, gurren lagann, cyber punk, hellscape, portrait, male anime character, robot, masterpiece, intricate, highly detailed, sharp, technological rings, by james mccarthy, glowing blue lush seascape bioluminescent, by beeple and johfra bosschart, combination in the style ayami kojima, highly detailed, painting, 3 d render beeple, unreal engine render, intricate abstract, intricate artwork, by tooth wu, wlop, beeple, dan mumford. concept art, octane render, trending on artstation, greg rutkowski very coherent symmetrical artwork. cinematic, key art, hyper realism, high detail, octane render, 8 k, iridescent accents, albedo from overlord, the library of gems, intricate abstract. intricate artwork, by tooth wu, wlop, beeple, dan mumford. concept art, octane render, trending on artstation, greg rutkowski very coherent symmetrical artwork. cinematic, key art, hyper realism, high detail, octane render, 8 k, iridescent accents**
**Prompt #****7**
![cutest bored girl, fine rococo fresco priestess wife wearing a golden wolf skull with ram horns in a bone ossuary by Dan Seagraves in style of H. R. Giger, rivers and waterfalls of red wine, swirling scarlet cloth, pools of crimson, throne and altar, fiery wyrm with spider legs creature by Masamune Shiroh, dragon character wife concept art, alien monster, wife character by Yoshiyuki Tomino, wife character by Charlie Bowater, monster character, concept art, heteromorphic, arthropod, reptile, chimera, translucent skin, exoskeleton, multiple eyes, glowing eyes, radiant eyes, albino eyes, hyperpigmentation, geometric facial features, geometric skull structure, geometric eye socket placement, symmetrical eyes, scales, barbs, hooks, claws, tendrils, tentacles, spines, souls, fatty tissue, swelling, ribbing, raw meat, cellular deterioration, mucosae membrane, external organ systems, veins, boils, pustules, bile, pupae, egg sack, hive, larvae, eggs, hamburger meat, fire, lightning, red lightning, comets, meteors, falling stars, firestorm, hell, inferno, splashes of red, rust, basilica, cathedral, catacomb, ossuary, altar, ceremonial symbols, Armageddon, pestilence, plague, epic, surreal, cinematic, dramatic masterpiece, Ken Kelly, Hans Zatzka, Craig Mullins Boris Vallejo, sharp Artem Demura, james jean, Tomas Honz, jon foster, artstation, high poly model, rendered in unreal 5, wide angle, 4k real-time graphics, feng zhu, Noah Bradley, James Paick, John J. Park, Maciej Kuciara, Victor Mosquera :: beautiful 35mm footage, detailed, intricate, WLOP, detailed, hyperrealism, postprocessing, 8k, octane render, de-noise, blender render --s 2750 --ar 9:16 --q 5](https://mpost.io/wp-content/uploads/image-46-94.jpg)
**cutest bored girl, fine rococo fresco priestess wife wearing a golden wolf skull with ram horns in a bone ossuary by Dan Seagraves in style of H. R. Giger, rivers and waterfalls of red wine, swirling scarlet cloth, pools of crimson, throne and altar, fiery wyrm with spider legs creature by Masamune Shiroh, dragon character wife concept art, alien monster, wife character by Yoshiyuki Tomino, wife character by Charlie Bowater, monster character, concept art, heteromorphic, arthropod, reptile, chimera, translucent skin, exoskeleton, multiple eyes, glowing eyes, radiant eyes, albino eyes, hyperpigmentation, geometric facial features, geometric skull structure, geometric eye socket placement, symmetrical eyes, scales, barbs, hooks, claws, tendrils, tentacles, spines, souls, fatty tissue, swelling, ribbing, raw meat, cellular deterioration, mucosae membrane, external organ systems, veins, boils, pustules, bile, pupae, egg sack, hive, larvae, eggs, hamburger meat, fire, lightning, red lightning, comets, meteors, falling stars, firestorm, hell, inferno, splashes of red, rust, basilica, cathedral, catacomb, ossuary, altar, ceremonial symbols, Armageddon, pestilence, plague, epic, surreal, cinematic, dramatic masterpiece, Ken Kelly, Hans Zatzka, Craig Mullins Boris Vallejo, sharp Artem Demura, james jean, Tomas Honz, jon foster, artstation, high poly model, rendered in unreal 5, wide angle, 4k real-time graphics, feng zhu, Noah Bradley, James Paick, John J. Park, Maciej Kuciara, Victor Mosquera :: beautiful 35mm footage, detailed, intricate, WLOP, detailed, hyperrealism, postprocessing, 8k, octane render, de-noise, blender render s 2750 ar 9:16 q 5**
**Prompt #****8**
![female athletic body type and male warrior strong body type holding each other close by Boris Vallejo, moody, character design concept art, diablo, warcraft, hard surface, Character design, dramatic, highly detailed, photorealistic, digital painting, painterly, artstation, concept art, smooth, sharp focus, art by John Collier and Krenz Cushart and Artem Demura and Albert Aublet](https://mpost.io/wp-content/uploads/image-46-95.jpg)
**female athletic body type and male warrior strong body type holding each other close by Boris Vallejo, moody, character design concept art, diablo, warcraft, hard surface, Character design, dramatic, highly detailed, photorealistic, digital painting, painterly, artstation, concept art, smooth, sharp focus, art by John Collier and Krenz Cushart and Artem Demura and Albert Aublet**
**Prompt #9**
![a detailed manga illustration character full body portrait of a dark haired cyborg anime man who has a red mechanical eye and is wearing a cape, trending on artstation, digital art, 4 k resolution, detailed, high quality, sharp focus, hq artwork, insane detail, concept art, character concept, character illustration, full body illustration, cinematic, dramatic lighting](https://mpost.io/wp-content/uploads/image-46-96.jpg)
**a detailed manga illustration character full body portrait of a dark haired cyborg anime man who has a red mechanical eye and is wearing a cape, trending on artstation, digital art, 4 k resolution, detailed, high quality, sharp focus, hq artwork, insane detail, concept art, character concept, character illustration, full body illustration, cinematic, dramatic lighting**
**Prompt #10**
![a hyper realistic character concept art of a beautiful african tribe woman, 4K symmetrical portrait,character concept art, oilpainting, Rendered in Octane,trending in artstation, cgsociety, 8k post-processing highly detailed,Junji Murakami, Mucha Klimt, Sharandula, Hiroshi Yoshida, Tom Bagshaw, Ross Tran, Artgerm,Craig Mullins,dramatic,Junji Murakami, moody lighting rendered by octane engine,characters 8K symmetrical arstation, cape,cinematic lighting, intricate details, 8k detail post processing, hyperealistic, octane rend, Zdzisław Beksiński style, ar 2:3 --uplight](https://mpost.io/wp-content/uploads/image-46-97.jpg)
**a hyper realistic character concept art of a beautiful african tribe woman, 4K symmetrical portrait,character concept art, oilpainting, Rendered in Octane,trending in artstation, cgsociety, 8k post-processing highly detailed,Junji Murakami, Mucha Klimt, Sharandula, Hiroshi Yoshida, Tom Bagshaw, Ross Tran, Artgerm,Craig Mullins,dramatic,Junji Murakami, moody lighting rendered by octane engine,characters 8K symmetrical arstation, cape,cinematic lighting, intricate details, 8k detail post processing, hyperealistic, octane rend, Zdzisław Beksiński style, ar 2:3 uplight**
## Best AI Graphic Design Prompts
**Prompt #1**
![ancient scroll diagram, bold shūji, chart, schematics, infographic, scientific, measurements, abstract, surreal, collage, new media design, poster, colorful highlights, tarot card, glowing ruins, marginalia, 8k, extremely detailed::1 style of Katsuhiro Otomo + Masamune Shirow::0.8 pantone, on black canvas, typography annotations::0.3 --ar 3:5 --q 2 --chaos 15](https://mpost.io/wp-content/uploads/image-46-99.jpg)
**ancient scroll diagram, bold shūji, chart, schematics, infographic, scientific, measurements, abstract, surreal, collage, new media design, poster, colorful highlights, tarot card, glowing ruins, marginalia, 8k, extremely detailed::1 style of Katsuhiro Otomo + Masamune Shirow::0.8 pantone, on black canvas, typography annotations::0.3 ar 3:5 q 2 chaos 15**
**Prompt #****2**
![beautiful butterfly anatomy diagram, bold shūji, chart, schematics, infographic, scientific, measurements, abstract, surreal, collage, new media design, poster, colorful highlights, tarot card, glowing ruins, marginalia, 8k, extremely detailed, dark color palette + style of Katsuhiro Otomo + Masamune Shirow + pantone, on black canvas, typography annotations](https://mpost.io/wp-content/uploads/image-46-100.jpg)
**beautiful butterfly anatomy diagram, bold shūji, chart, schematics, infographic, scientific, measurements, abstract, surreal, collage, new media design, poster, colorful highlights, tarot card, glowing ruins, marginalia, 8k, extremely detailed, dark color palette + style of Katsuhiro Otomo + Masamune Shirow + pantone, on black canvas, typography annotations**
**Prompt #****3**
![A type specimen poster showing every letter in the alphabet where each letter is made of pieces of simple shapes like circles, squares, triangles, and diamonds like color-forms very colorful and vibrant::2 poster in the international typographic style showing line-art illustrations of a full color spectrum typeface graphic design —h 432 —vibe](https://mpost.io/wp-content/uploads/image-46-103.jpg)
**A type specimen poster showing every letter in the alphabet where each letter is made of pieces of simple shapes like circles, squares, triangles, and diamonds like color-forms very colorful and vibrant::2 poster in the international typographic style showing line-art illustrations of a full color spectrum typeface graphic design —h 432 —vibe**
**Prompt #****4**
![3d typography made of ferrofluid, letter "A", with neon color particels, cells, bacteria, marco feeling, glossy material, hyper realistic, 8k](https://mpost.io/wp-content/uploads/image-46-104.jpg)
**3d typography made of ferrofluid, letter “A”, with neon color particels, cells, bacteria, marco feeling, glossy material, hyper realistic, 8k**
**Prompt #****5**
![Typography letter A, hardware parts and cables full of laces, foam bubble translucent, colour bloom drone tech, hardware parts, werable tech, mixed materials organic and pvc multilayer, hyper realistic, cyber punk -](https://mpost.io/wp-content/uploads/image-46-105.jpg)
**Typography letter A, hardware parts and cables full of laces, foam bubble translucent, colour bloom drone tech, hardware parts, werable tech, mixed materials organic and pvc multilayer, hyper realistic, cyber punk **
**Prompt #****6**
![Full page concept design how to craft life Poison, intricate details,infographic of alchemical, diagram of how to make potions, captions, directions, ingredients, drawing , magic,wuxia](https://mpost.io/wp-content/uploads/image-46-106.jpg)
**Full page concept design how to craft life Poison, intricate details,infographic of alchemical, diagram of how to make potions, captions, directions, ingredients, drawing , magic,wuxia**
**Prompt #****7**
![
a full page design of spaceship engine, black and bronze paper, intricate, highly detailed, epic, infographic, marginalia --ar 9:16](https://mpost.io/wp-content/uploads/image-46-107.jpg)
**
a full page design of spaceship engine, black and bronze paper, intricate, highly detailed, epic, infographic, marginalia ar 9:16**
**Prompt #****8**
![a detailed and award winning movie poster with a white marble statue of the venus de milo wearing motorcycle helmet, no arms, closed visor, marble, statue, museum, soft lighting, night time, graphic design, typography, indoor, 8 k, detailed, beautiful, symmetrical, denoise, sharp focus, realistic, photography, cinematic lighting](https://mpost.io/wp-content/uploads/image-46-108.jpg)
**a detailed and award winning movie poster with a white marble statue of the venus de milo wearing motorcycle helmet, no arms, closed visor, marble, statue, museum, soft lighting, night time, graphic design, typography, indoor, 8 k, detailed, beautiful, symmetrical, denoise, sharp focus, realistic, photography, cinematic lighting**
**Prompt #****9**
![“WORLDS”: zoological fantasy ecosystem infographics, magazine layout with typography, annotations, in the style of Elena Masci, Studio Ghibli, Caspar David Friedrich, Daniel Merriam, Doug Chiang, Ivan Aivazovsky, Herbert Bauer, Edward Tufte, David McCandless —ar 5:7 --s 5000 --q 2](https://mpost.io/wp-content/uploads/image-46-110.jpg)
**“WORLDS”: zoological fantasy ecosystem infographics, magazine layout with typography, annotations, in the style of Elena Masci, Studio Ghibli, Caspar David Friedrich, Daniel Merriam, Doug Chiang, Ivan Aivazovsky, Herbert Bauer, Edward Tufte, David McCandless —ar 5:7 s 5000 q 2**
**Prompt #****10**
![A detailed infographic, marginalia titled 'Face of sadness' description 'Order of the occult princess' portrait, character design, worn, dark, manga style, extremely high detail, photo realistic, pen and ink, intricate line drawings, by MC Escher, Yoshitaka Amano, Ruan Jia, Kentaro Miura, Artgerm, style by eddie mendoza, raphael lacoste, alex ross](https://mpost.io/wp-content/uploads/image-46-111.jpg)
**A detailed infographic, marginalia titled Face of sadness description Order of the occult princess portrait, character design, worn, dark, manga style, extremely high detail, photo realistic, pen and ink, intricate line drawings, by MC Escher, Yoshitaka Amano, Ruan Jia, Kentaro Miura, Artgerm, style by eddie mendoza, raphael lacoste, alex ross**
## Best AI Wallpaper Prompts
**Prompt #1**
![a lone skyscraper landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, atmospheric, hyper realistic, 8k, epic composition, cinematic, artstation --w 1024 --h 1280](https://mpost.io/wp-content/uploads/image-46-114.jpg)
**a lone skyscraper landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, atmospheric, hyper realistic, 8k, epic composition, cinematic, artstation w 1024 h 1280**
**Prompt #****2**
![Garden+factory,Tall factory,Many red rose,A few roses,clouds, ultra wide shot, atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal --hd --ar 9:16](https://mpost.io/wp-content/uploads/image-46-113.jpg)
**Garden+factory,Tall factory,Many red rose,A few roses,clouds, ultra wide shot, atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal hd ar 9:16**
**Prompt #****3**
![The Legend of Zelda landscape atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine —ar 16:9](https://mpost.io/wp-content/uploads/image-46-115.jpg)
**The Legend of Zelda landscape atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine —ar 16:9**
**Prompt #****4**
![a landscape by simon stalenhag of a very large realistic highly detailed imposing robotic mechanical cat, stranded alone and roaming in the chaos across a depressing abandoned post - apocalyptic landscape, post - apocalyptic corrupted themes, artstation trending, beautiful art landscape, detailed simon stalenhag landscape](https://mpost.io/wp-content/uploads/image-46-116.jpg)
**a landscape by simon stalenhag of a very large realistic highly detailed imposing robotic mechanical cat, stranded alone and roaming in the chaos across a depressing abandoned post apocalyptic landscape, post apocalyptic corrupted themes, artstation trending, beautiful art landscape, detailed simon stalenhag landscape**
**Prompt #****5**
![rough ocean storm atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine —ar 16:9](https://mpost.io/wp-content/uploads/image-46-117.jpg)
**rough ocean storm atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine —ar 16:9**
**Prompt #****6**
![
A grand city in the year 2100, atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine —ar 16:9](https://mpost.io/wp-content/uploads/image-46-118.jpg)
**
A grand city in the year 2100, atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine —ar 16:9**
**Prompt #****7**
![the eye of the storm, atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine --ar 16:9](https://mpost.io/wp-content/uploads/image-46-119.jpg)
**the eye of the storm, atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine ar 16:9**
**Prompt #****8**
![walking on the starlight,dreamy ultra wide shot, atmospheric, hyper realistic, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine --iw 10 --ar 9:16](https://mpost.io/wp-content/uploads/image-46-120.jpg)
**walking on the starlight,dreamy ultra wide shot, atmospheric, hyper realistic, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine iw 10 ar 9:16**
**Prompt #****9**
![futuristic nighttime cyberpunk New York City skyline landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, atmospheric, hyper realistic, 8k, epic composition, cinematic, artstation —ar 16:9](https://mpost.io/wp-content/uploads/image-46-121.jpg)
**futuristic nighttime cyberpunk New York City skyline landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, atmospheric, hyper realistic, 8k, epic composition, cinematic, artstation —ar 16:9**
**Prompt #****10**
![
cursed zelda ruins landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape::8 --iw 10 --no blur, blurry, bokeh, dirty, eyes, face, figure, hair, human, man, noisy, oversharpened, paint flecks, people, person, scratches, skin, text, too dark, too sharp, unclear, underexposed, undeveloped, watermark, woman --w 768 --h 512 --hd --uplight](https://mpost.io/wp-content/uploads/image-46-122.jpg)
**
cursed zelda ruins landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape::8 iw 10 no blur, blurry, bokeh, dirty, eyes, face, figure, hair, human, man, noisy, oversharpened, paint flecks, people, person, scratches, skin, text, too dark, too sharp, unclear, underexposed, undeveloped, watermark, woman w 768 h 512 hd uplight**
## Best AI Cinematic Prompts
**Prompt #1**
![A world of fire, atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine --w 1024 --h 1280](https://mpost.io/wp-content/uploads/image-46-123.jpg)
**A world of fire, atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine w 1024 h 1280**
**Prompt #2**
![a rocky valley on a distant planet, volcanic landscape, concept art, octane render, unreal engine 5, trending on artstation, high quality, highly detailed, 8 k hdr, red sea, blue sand, high coherence, path traced, serene landscape, breathtaking landscape, cinematic lighting, hyperrealistic, golden hour](https://mpost.io/wp-content/uploads/image-46-124.jpg)
**a rocky valley on a distant planet, volcanic landscape, concept art, octane render, unreal engine 5, trending on artstation, high quality, highly detailed, 8 k hdr, red sea, blue sand, high coherence, path traced, serene landscape, breathtaking landscape, cinematic lighting, hyperrealistic, golden hour**
**Prompt #3**
![tree house in the forest, atmospheric, hyper realistic, epic composition, cinematic, landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, unreal engine --ar 9:16](https://mpost.io/wp-content/uploads/image-46-125.jpg)
**tree house in the forest, atmospheric, hyper realistic, epic composition, cinematic, landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, unreal engine ar 9:16**
**Prompt #4**
![Fantasy art, octane render, 16k, 8k, cinema 4d, back-lit, caustics, clean environment, Wood pavilion architecture, warm led lighting, dusk, Landscape, snow, arctic, with aqua water, silver Guggenheim museum spire, with rays of sunshine, white fabric landscape, tall building, zaha hadid and Santiago calatrava, smooth landscape, cracked ice, igloo, warm lighting, aurora borialis,3d cgi, high definition, natural lighting, realistic, hyper realism --uplight](https://mpost.io/wp-content/uploads/image-46-126.jpg)
**Fantasy art, octane render, 16k, 8k, cinema 4d, back-lit, caustics, clean environment, Wood pavilion architecture, warm led lighting, dusk, Landscape, snow, arctic, with aqua water, silver Guggenheim museum spire, with rays of sunshine, white fabric landscape, tall building, zaha hadid and Santiago calatrava, smooth landscape, cracked ice, igloo, warm lighting, aurora borialis,3d cgi, high definition, natural lighting, realistic, hyper realism uplight**
**Prompt #5**
![A trail through the unknown, atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine --ar 9:16](https://mpost.io/wp-content/uploads/image-46-127.jpg)
**A trail through the unknown, atmospheric, hyper realistic, 8k, epic composition, cinematic, octane render, artstation landscape vista photography by Carr Clifton & Galen Rowell, 16K resolution, Landscape veduta photo by Dustin Lefevre & tdraw, 8k resolution, detailed landscape painting by Ivan Shishkin, DeviantArt, Flickr, rendered in Enscape, Miyazaki, Nausicaa Ghibli, Breath of The Wild, 4k detailed post processing, artstation, rendering by octane, unreal engine ar 9:16**
**Prompt #6**
![a highly detailed epic cinematic concept art an alien pyramid landscape , art station, landscape, concept art, illustration, highly detailed artwork cinematic, hyper realistic painting](https://mpost.io/wp-content/uploads/image-46-133.jpg)
a highly detailed epic cinematic concept art an alien pyramid landscape , art station, landscape, concept art, illustration, highly detailed artwork cinematic, hyper realistic painting
**Prompt #****7**
![A cinematic shot of a Richard Hammond from Top Gear running faster than a futuristic super jet through a futuristic Tokyo street, cinematic. 3d with depth of field, blurred background. female. nautilus. A highly detailed epic cinematic concept art CG render. made in Blender and Photoshop, octane render, excellent composition, cinematic dystopian brutalist atmosphere. dynamic lighting. dramatic lighting. cinematic lighting. aesthetic. stylized. very inspirational. detailed. hq. realistic. warm light. vibrant color scheme. highly detailed. muted colors. Moody. Filmic.](https://mpost.io/wp-content/uploads/image-46-129.jpg)
**A cinematic shot of a Richard Hammond from Top Gear running faster than a futuristic super jet through a futuristic Tokyo street, cinematic. 3d with depth of field, blurred background. female. nautilus. A highly detailed epic cinematic concept art CG render. made in Blender and Photoshop, octane render, excellent composition, cinematic dystopian brutalist atmosphere. dynamic lighting. dramatic lighting. cinematic lighting. aesthetic. stylized. very inspirational. detailed. hq. realistic. warm light. vibrant color scheme. highly detailed. muted colors. Moody. Filmic.**
**Prompt #****8**
![postapocalyptic city turned to fractal glass, ctane render, 8 k, exploration, cinematic, trending on artstation, by beeple, realistic, 3 5 mm camera, unreal engine, hyper detailed, photo - realistic maximum detai, volumetric light, moody cinematic epic concept art, realistic matte painting, hyper photorealistic, concept art, volumetric light, cinematic epic, octane render, 8 k, corona render, movie concept art, octane render, 8 k, corona render, cinematic, trending on artstation, movie concept art, cinematic composition, ultra - detailed, realistic, hyper - realistic, volumetric lighting, 8 k](https://mpost.io/wp-content/uploads/image-46-130.jpg)
**postapocalyptic city turned to fractal glass, ctane render, 8 k, exploration, cinematic, trending on artstation, by beeple, realistic, 3 5 mm camera, unreal engine, hyper detailed, photo realistic maximum detai, volumetric light, moody cinematic epic concept art, realistic matte painting, hyper photorealistic, concept art, volumetric light, cinematic epic, octane render, 8 k, corona render, movie concept art, octane render, 8 k, corona render, cinematic, trending on artstation, movie concept art, cinematic composition, ultra detailed, realistic, hyper realistic, volumetric lighting, 8 k**
**Prompt #****9**
![
a highly detailed epic cinematic concept art CG render digital painting artwork: dieselpunk steaming half man half robot. By Greg Rutkowski, Ilya Kuvshinov, WLOP, Stanley Artgerm Lau, Ruan Jia and Fenghua Zhong, trending on ArtStation, subtle muted cinematic colors, made in Maya, Blender and Photoshop, octane render, excellent composition, cinematic atmosphere, dynamic dramatic cinematic lighting, precise correct anatomy, aesthetic, very inspirational, arthouse](https://mpost.io/wp-content/uploads/image-46-131.jpg)
**
a highly detailed epic cinematic concept art CG render digital painting artwork: dieselpunk steaming half man half robot. By Greg Rutkowski, Ilya Kuvshinov, WLOP, Stanley Artgerm Lau, Ruan Jia and Fenghua Zhong, trending on ArtStation, subtle muted cinematic colors, made in Maya, Blender and Photoshop, octane render, excellent composition, cinematic atmosphere, dynamic dramatic cinematic lighting, precise correct anatomy, aesthetic, very inspirational, arthouse**
**Prompt #10**
![a highly detailed epic cinematic concept art CG render digital painting artwork: dieselpunk patrol car inspired by a locomotive. By Greg Rutkowski, Ilya Kuvshinov, WLOP, Stanley Artgerm Lau, Ruan Jia and Fenghua Zhong, trending on ArtStation, subtle muted cinematic colors, made in Maya, Blender and Photoshop, octane render, excellent composition, cinematic atmosphere, dynamic dramatic cinematic lighting, precise correct anatomy, aesthetic, very inspirational, arthouse](https://mpost.io/wp-content/uploads/image-46-132.jpg)
**a highly detailed epic cinematic concept art CG render digital painting artwork: dieselpunk patrol car inspired by a locomotive. By Greg Rutkowski, Ilya Kuvshinov, WLOP, Stanley Artgerm Lau, Ruan Jia and Fenghua Zhong, trending on ArtStation, subtle muted cinematic colors, made in Maya, Blender and Photoshop, octane render, excellent composition, cinematic atmosphere, dynamic dramatic cinematic lighting, precise correct anatomy, aesthetic, very inspirational, arthouse**
## FAQs
## What is Stable Diffusion?
Stable Diffusion is a text-to-image ML model created by StabilityAI in partnership with EleutherAI and LAION that generates digital images from natural language descriptions. The technique can also be used to generate image-to-image translations prompted by a text prompt.
## How does Stable Diffusion work?
This deep-learning system family includes Stable Diffusion. Stable Diffusion, in particular, learns the relationship between image and text via a latent Diffusion Model approach. Diffusion models function by introducing noise into visual data.
## Is Stable Diffusion Open source?
This existing quo, however, has recently been challenged by a new player on the scene: Stable Diffusion, a text-to-picture application that enables open-source, unfiltered image production that is free to use for anyone with a reasonable computer and a little technical know-how.
## What is a latent diffusion model?
CompVis developed the text-to-image model known as Latent Diffusion, which was trained on the LAION-400M dataset. The models user interface was put together by @multimodalart. Try modifying your prompt by including phrases like “oil on canvas,” “a painting,” or “a book cover.”
## What is a diffusion model in machine learning?
Since diffusion models are generative models, they can be used to create data that is comparable to the data they were trained on. Diffusion models basically work by erasing training data by adding Gaussian noise one at a time, then learning to recover the data by undoing this noise-adding process.
## What was stable diffusion trained on?
Stable Diffusion is trained on a sizable dataset that it mines for patterns and learns to replicate, like the majority of contemporary AI systems. In this instance, the bulk of the training data, or LAION-5B, consists of more than 5 billion pairings of images and text tags that have all been collected from the public internet.
## **Conclusion**
I have experimented with a number of questions across many categories, including general, Metaverse, NFTs, and cryptocurrency. According to the findings, the Stable Diffusion model suffers with upcoming technologies like NFTs, the Metaverse, Web3, VR&AR and blockchain. This is due to the dearth of datasets for these recent developments in technology.
Recall that the Stable Diffusion neural network will continue to be trained using millions and billions of datasets before you go.
**Interested in learning more? Here are some additional guides to check out:**
@@ -0,0 +1,114 @@
---
page-title: "ChatGPT Plus 如何购买?10分钟搞定,功能强大 | 程序员泥瓦匠"
url: https://bysocket.com/openai-chatgpt-plus-account-subscribe/
date: "2023-04-21 22:21:50"
---
## ChatGPT Plus 如何购买?10分钟搞定,功能强大
ChatGPT Plus是一种经过OpenAI训练的大型语言模型,它是原始ChatGPT的升级版,具有更高的性能和更丰富的功能。如何购买呢?看下面教程
## [](https://bysocket.com/openai-chatgpt-plus-account-subscribe/#%E4%BB%80%E4%B9%88%E6%98%AF-ChatGPT-Plus%EF%BC%9F "什么是 ChatGPT Plus")什么是 ChatGPT Plus
![](https://image.bysocket.com/2023/02/23/20230223120307.webp)
ChatGPT Plus相对于原始ChatGPT,具有以下功能上的对比:
- 更大的模型尺寸:ChatGPT Plus拥有更大的模型尺寸,可以处理更复杂、更长的输入文本,从而提供更准确、更全面的答案。
- 更高的语言理解能力:ChatGPT Plus具有更高的语言理解能力,可以更好地理解语言的上下文和语义,从而提供更准确、更自然的回答。
- 更好的实时交互性能:ChatGPT Plus可以更快地生成回答,从而提供更流畅、更高效的交互体验。
- 更多的应用场景:ChatGPT Plus不仅可以用于聊天机器人,还可以应用于语言翻译、文本摘要、知识图谱等领域,具有更广泛的应用场景。
总的来说,ChatGPT Plus比原始ChatGPT更加强大和多功能,可以为更多的应用场景提供更高质量的语言处理服务。
点击领取海外原装 ChatGPT 正版账号:[http://aa.nsjiasu.com/details/2D1BB2BC](http://aa.nsjiasu.com/details/2D1BB2BC)
## [](https://bysocket.com/openai-chatgpt-plus-account-subscribe/#%E5%A6%82%E4%BD%95%E8%AE%A2%E9%98%85%E8%B4%AD%E4%B9%B0-ChatGPT-Plus "如何订阅购买 ChatGPT Plus")如何订阅购买 ChatGPT Plus
花费:充值一次,至少500元,实际花费一个月的20刀,实际只需要:开卡费3.5$+充值21$+充值金额21$\*3%=180元人民币不到。
需要工具:实名绑定的微信号、手机号、微信付费,最低充值金额500元。
- 确认自己付费,有Plus入口:先登录到openai账号,找到左侧的plus标志。进入,预定,付款详情的界面。 (不然就先解决,Plus入口的问题)
- 注册开卡平台: 进入开卡平台的网址:[https://nobepay.com/](https://nobepay.com/) ,注册账号,根据提示,一步步绑定手机、微信,实名认证等步骤,扫码绑定微信进行收付款。
- 充值:最小充值金额是500元人民币。
- 开卡:点击左侧,我的卡片 ,如果只给自己开卡,点击左上的“开卡”,出现如下界面。
![](https://image.bysocket.com/2023/02/23/202302231306235.webp)
### [](https://bysocket.com/openai-chatgpt-plus-account-subscribe/#%E5%A1%AB%E5%86%99%E5%BC%80%E5%8D%A1%E4%BF%A1%E6%81%AF "填写开卡信息")填写开卡信息
需要依次选择号段、输入姓、名、街道地址、城市、州、邮编等。
号段选择:我购买的485953,实测都可用,其他号段没测。
姓名,自己随意,记得填英文。
地址和邮编,请填写真实存在的地址,以免出现问题。
(1) 这个网站 [https://va.postcodebase.com/zh-hans/randomaddress](https://va.postcodebase.com/zh-hans/randomaddress) ,可以随机出非常多的随机地址,下面都是真实地址。
![](https://image.bysocket.com/2023/02/23/202302231308732.webp)
(2)任选一个,作为我们的街道地址、城市、州 邮编填写进去
例如 9642 BURKE LAKE RD BURKE VA 22015-3041 USA
![](https://image.bysocket.com/2023/02/23/202302231309424.webp)
ChatGPT账户是20$每月,建议多充值1到2刀,每笔都有交易费,即使失败。所以多充1刀。
![](https://image.bysocket.com/2023/02/23/202302231309424.webp)
(3)点击开卡,出现卡片激活中,请稍等。
点击左侧:我的卡片→ 卡片列表,就能看到自己刚开的卡。如果显示未激活,就刷新一两次,就好了。
![](https://image.bysocket.com/2023/02/23/202302231309762.webp)
(4)右上角一键导出,就能得到自己的卡的完整信息。
点击领取海外原装 ChatGPT 正版账号:[http://aa.nsjiasu.com/details/2D1BB2BC](http://aa.nsjiasu.com/details/2D1BB2BC)
点击领取海外原装 ChatGPT 正版账号:[http://aa.nsjiasu.com/details/2D1BB2BC](http://aa.nsjiasu.com/details/2D1BB2BC)
点击领取海外原装 ChatGPT 正版账号:[http://aa.nsjiasu.com/details/2D1BB2BC](http://aa.nsjiasu.com/details/2D1BB2BC)
### [](https://bysocket.com/openai-chatgpt-plus-account-subscribe/#%E8%99%9A%E6%8B%9F%E4%BF%A1%E7%94%A8%E5%8D%A1%E6%94%AF%E4%BB%98%E8%AE%A2%E9%98%85 "虚拟信用卡支付订阅")虚拟信用卡支付订阅
将虚拟信用卡,输入到ChatGPT的付款页面,即可。
(敏感信息,就不截图了),付款完成,就成为了Plus会员。
![](https://image.bysocket.com/2023/02/23/202302231311547.webp)
每个月持续付费,也用的上,继续充值就好。
这个开卡操作,可以一键批量开卡,一个账号可以开卡1000个。结合批量随机真实地址的操作,千人的Plus会员轻松解决。
7. 最后,如果你没有plus会员开通的标识,切换到美国地址。新注册的美国号、美国IP的账号,直接有开通标识。
[![Overseas SaaS](https://image.bysocket.com/2023/03/22/overseas-saas.webp)](https://www.bysocket.com/overseas-saas/)
![QRCode](https://image.bysocket.com/2023/02/qrcode.webp)
本文由 [泥瓦匠](https://www.bysocket.com/) 创作
原创不易,欢迎关注公众号!转载请注明出处,感谢支持!如果本文对您有用,欢迎转发分享!
[
下一篇
ChatGPT 参数数量是什么?有什么用?
](https://bysocket.com/openai-chatgpt-parameters/)[
上一篇
2023年 OpenAI、ChatGPT 注册方法教程(国内100%可用)
](https://bysocket.com/register-openai-chatgpt/)
@@ -0,0 +1,229 @@
---
page-title: "Chatgpt4中国申请,Chatgpt3.5中国区免费1年使用攻略,微软Azure云openai详细api注册申请图文教程,整合odoo AiCenter - | odoo软件开发实施_广州尚鹏,服装生鲜家具外贸供应链开源ERP专业实施"
url: https://www.sunpop.cn/chatgpt_in_china_with_azure_openai_api_free_1_year_odoo/
date: "2023-04-16 20:33:54"
---
- [摘要](https://www.sunpop.cn/chatgpt_in_china_with_azure_openai_api_free_1_year_odoo/#title-0 "摘要")
- [1,注册微软Azure用户](https://www.sunpop.cn/chatgpt_in_china_with_azure_openai_api_free_1_year_odoo/#title-1 "1,注册微软Azure用户")
- [2,申请一年免费试用](https://www.sunpop.cn/chatgpt_in_china_with_azure_openai_api_free_1_year_odoo/#title-2 "2,申请一年免费试用")
- [3,申请OpenAi的接口](https://www.sunpop.cn/chatgpt_in_china_with_azure_openai_api_free_1_year_odoo/#title-3 "3,申请OpenAi的接口")
- [5,得到 apikey](https://www.sunpop.cn/chatgpt_in_china_with_azure_openai_api_free_1_year_odoo/#title-4 "5,得到 apikey")
- [6,对接各种应用](https://www.sunpop.cn/chatgpt_in_china_with_azure_openai_api_free_1_year_odoo/#title-5 "6,对接各种应用")
**目录**
> 强势发布ChatGpt4,智能图文大火后,今天又迎来了微软Ai的刷屏,Office + Chatgpt,全面智能办工,解放大脑的时代来了。
>
> 这次很友好,中国区全面开放,我们也很及时的申请了微软的免费ChatGpt接口,3.5turbo就是斯坦福水平,律师考试top10%那个版本,openai对接,过程很轻松,一年免费的同时还送你 **$200** 美金,Azure的接口随意用。有了接口,让Gpt帮你写几行代码,就可以轻松将Ai用于任何场景了。
>
> 作为程序员,gpt真是好助手。话不多说,写一下申请流程,odoo对接/python对接微软中国chatgpt模块请直接市场免费下载: [odoo\_ai\_center](https://apps.odoo.com/apps/modules/16.0/app_chatgpt/) 
先上效果,无需科学上网,中国区使用,在Azure的 openai chatgpt Playground。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/eb2800002c40e30ffbba2a9235e88c7b.png)通过Api对接,在odoo中同时与多个chatgpt对话。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/5aad73b434164115c9ce6afe038e8e37-1.png)
微软接口实际就是 Chatgpt 接口,虽然现在只是到3.5 turbo 版本,但比起无法访问的 openai,无法对接的  api.openai.com  能用就是硬道理。
#### 摘要
流程很简单,如下:
1,注册微软Azure用户
- 建议使用 hotmail 或者 outlook邮箱
2,申请一年免费试用
- 填入手机号
- 填入信用卡号
3,申请OpenAi的接口
- 回答几个问题,提交申请,等几天。。。
- 可以使用一年免费
- 如已过期一年,可使用按需付费,S0标准即可
- 费用标准:按响应内容收费,$0.002美金/每1000tokens。
tokens: 指分解单元,中文接近1个词1个token。
基本上就是**回答1个问题1分钱**。
4,配置openai
- 在Playground中使用
- 回答问题同时,会给出Python和Java的对接代码
5,得到 apikey
- 提供公钥和私钥
- 对接使用公钥 + 自已的出口地址 Endpoint即可
6,对接各种应用
- Chatgpt提供代码,自己简单对接
- 我们提供免费的Ai服务中心模块直接对接 [odoo\_ai\_center](https://apps.odoo.com/apps/modules/16.0/app_chatgpt/) 
#### 1,注册微软Azure用户
- 访问微软Azure平台直接申请
建议使用微软自家邮箱,稳定大容量,手机直接用。
[https://azure.microsoft.com/zh-cn/](https://azure.microsoft.com/zh-cn/)
![](https://www.sunpop.cn/wp-content/uploads/2023/03/9df38bcad0cea696af3774cf4e27f3b7.png)微软中国云服务是“世纪互联”提供,国家东数西算主力,也是中国第一家美股上市IDC,稳定高速,不锁区,好用得很哈。PS:也是浦东硅谷银行的大客户,这一波......
- 填入注册资料,这时可以大大方方选 **中国**
![](https://www.sunpop.cn/wp-content/uploads/2023/03/17c73e77878d39ecab594ee750a3e9b8.png)
验证后填入详细信息即可。建议填入真实地址,因为可以发账单报销,另外openai申请因为人多,信息越全越好吧。
#### 2,申请一年免费试用
- 填入信用卡信息
这里会告诉你免费12个月,送usd200
![](https://www.sunpop.cn/wp-content/uploads/2023/03/976e8ef0352ac586f096c51f94c5852b.png)
完成后,即可使用了。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/d006b6b51abc6c8ab29dfca3f4ae1b9e.png)
> **注意:**一般情况下,Azure会自动在你的信用卡账户下扣掉 1 美金,然后会再返你 1 美金,仅用于验证信用卡有效性。
#### 3,申请OpenAi的接口
直接访问
[https://portal.azure.com/?quickstart=true#view/Microsoft\_Azure\_ProjectOxford/CognitiveServicesHub/~/OpenAI](https://portal.azure.com/?quickstart=true#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI)
或者搜索 openai,即可进入申请页面
![](https://www.sunpop.cn/wp-content/uploads/2023/03/d30d65b589162161c821792f1ec11bbb.png)
按界面指示,创建 azure openai.
![](https://www.sunpop.cn/wp-content/uploads/2023/03/4ec04143abdcab5091bd5ac1e5c0c5ba.png)
创建 Azure OpenAI,资源组自己起个名,比如 odooapp
![](https://www.sunpop.cn/wp-content/uploads/2023/03/4a9fef8676c13ecad3350c21195ffedf.png)这时就会提示了需要特殊申请了。点击去申请 openai 服务。
填入相关信息,最重要的是 订阅服务 id,
![](https://www.sunpop.cn/wp-content/uploads/2023/03/642a9daa2332f4bf4ec10121e79389ab.png)
这个去右上方找,复制过来即可。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/1218c360b12a024bf86cd36fa6d56382.png)
接着是公司信息,注意现在chatgpt只支持公司申请,不要使用免费邮箱,使用自己公司邮箱即可。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/92e44f63e231ef9e0c6b84b26b4bbb5d.png)
申请模型时,Text是指chatgpt,Dall-e2是图片引擎,可以一并申请
![](https://www.sunpop.cn/wp-content/uploads/2023/03/4bbb17a23898ffd06c816ee1879aafb9.png)
填完20多个问题提交即可,越真实越好,毕竟排队人多,有空可以把他们的调研也做了。
如果你有在微软的同学,那你很幸运,填入她或他的id,可以加快你的审批流程。如果你是微软MVP,那你也很幸运,填入id即可。我们是2种幸运加持,所以很快过审了。
#### 4,配置openai
申请过审后,2~10天不等,你会收到一封邮件,点击 verify 验证通过,千万不要点错到 not register了。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/ef28c4c90a84e4a68f0e3245a9b2f7e5.png)
这只是验证邮件,再多等几天,如果申请通过,你会再收到一封 onboarding 邮件。
如果你对 Chatgpt4感兴趣,也同时申请了Chatgpt4,那么再等多几天,可能你就会从Waiting List转入到 Preview 队列中。
#### **Onboarding 邮件,代表申请通过,可使用Chatgpt3.5及Dalle-2**
![](https://www.sunpop.cn/wp-content/uploads/2023/04/b9aceffee46ed3b928dace5ed39ee3f1.png)
Chatgpt4的申请我们也过了,可能和在微软积累的信用有关,还是比较顺利的。
![](https://www.sunpop.cn/wp-content/uploads/2023/04/f225a82edc5e1ad751f480cb0f13f03b-1.png)
Chatgpt4 十分十分好用,回答高效很多,不过价格真是贵,连Prompt也计价,差不多40倍了。
资质过了,然后就可以开始配置 openai 接口了。回到我们开头的配置页。
[https://portal.azure.com/?quickstart=true#create/Microsoft.CognitiveServicesOpenAI](https://portal.azure.com/?quickstart=true#create/Microsoft.CognitiveServicesOpenAI)
![](https://www.sunpop.cn/wp-content/uploads/2023/03/ca835fd62692feefd40a4c3173d1f349.png)
选择好订阅id,如“免费”,或者 "按需付费 pay as you go"的付款方式,选好openai的服务区等,即可使用了。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/f2f4f30894db994bf8260e06787abc56.png)
进入我们配置的 odoo chatgpt 资源,选 model deployments,即可配置要用的ai模型。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/9f3a1c41c7fb6fc27849064051bc9303.png)
注意要选最新的modelChatgpt4只能到 openai.com中申请。当前 Azure中可选的是chatgpt 3.5,这个已经是专业律师,能过斯坦福入学的了。
申请完了,直接点击可以到 ChatGPT PlayGround中快乐玩耍了。不锁区,中国可用。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/367f59909b4e63645df989e8a181ba56.png)
进入后,先选配置,我们可以看到,他有很多优化选项
- Shakespeare writing assistant。莎士比亚写作助手,这个是一个AI saas写作服务,可以给直播写脚本。
- IRS tax chatbot。美国联邦的税务机器人,教你如何更好处理税务
- Marketing Writing Assistant。营销写手,不用多说了
- Xbox customer support agent。微软自家的游戏支持,攻略kakalai
- Hiking recommendations chatbot。自助游助手
- JSON formatter assistant。这个就是程序员弱鸡。。。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/831eb8b02884bdc5852af5e8d886e733.png)
我们来选个杀死比尔写手吧,问个刁点的。注意这里的 Temperature 参数,最常用,指回答的创造性,不同设置会给你不同答案
![](https://www.sunpop.cn/wp-content/uploads/2023/03/ab9e2028ed1a65dda9f9d68df07af95b.png)
答案很聪明,哈哈
![](https://www.sunpop.cn/wp-content/uploads/2023/03/52a00137165116441d02837d10470635.png)
#### 5,得到 apikey
我们可以看到 Azure面板中已经有我们刚创建的 openai资源,点击进去,可以看到信息, endpoint 是对接要用到的
![](https://www.sunpop.cn/wp-content/uploads/2023/03/a0b607c5bee232d039899098205f168f.png)
点击manage keys,就可以得到我们的 key 了,主要是 key1,对接时在代码中填入即可。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/2d522a710d58feb463c6d89ef12cb177.png)
#### 6,对接各种应用
ChatGpt应用场景很广,一个7\*24小时,可以通过律师考试的Ai机器人,可想而知,具体就八仙过海吧。一般对接的接口很简单,发参数就成,github上随处可见。chatgpt 3.5和4比较新,直接看文档写就成。
如果你也是 odoo 的开发者,那么很幸运,我们一早开发好免费的对接模块,可以直接对接微软Azure,对接openai.com的 chatgpt。而且可以同时对接多个 ai 机器人。
1个api,即可服务于你的所有客户或者全公司的人了。
\==========
简单说下设置,安装好后,进入机器人管理菜单。 设置,用户, Gpt Robot,进入配置。
选择好 Azure 作为 provider,选对model,填入你的 endpointapi key,保存。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/e344c6770dc42e718d9beaa34405a2e0.png)然后使用 odoo 的聊天即可。 直接独聊就是对单个ai机器人, 群聊中可以 @ 指定的ai对话。
可以给ai的回答打分,这样达到训练目的,即可优化ai下一次回答。
![](https://www.sunpop.cn/wp-content/uploads/2023/03/cdbf023bfb7ca35a2e696da221f49400.png)
以上,就是如何在中国免费使用 chatgpt 了,一个接口,全村的希望就来了 :),使用odoo + chatgpt,可以同时使用多个Ai,来为全公司服务。
当然,最重要的是合法合规,公开享受Ai的乐趣。
我们的Chatgpt小程序即将上线,增加了很多极其方便的功能,最重要的是有 Chatgpt4,敬请关注  [https://www.odooai.cn](https://www.odooai.cn/),现在还是我们贴钱让您免费用,快来玩下吧。
@@ -0,0 +1,59 @@
---
page-title: "Creating user, database and adding access on PostgreSQL | by Arnav Gupta | Coding Blocks | Medium"
url: https://medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91e
date: "2023-04-19 14:27:48"
---
## Creating user, database and adding access on PostgreSQL
![](https://miro.medium.com/v2/resize:fit:875/1*IW4iIzJdAX0kAmUGmZApnQ.png)
A nice postgres installation graphic by [http://digitalocean.com](http://digitalocean.com/). DO hosts great servers, check them out.
***NOTE****: Right off the bat — this is valid as on March 2017, running on Ubuntu 16.04.2, with PostgreSQL 9.6*
TL;DR; version
sudo -u postgres psql
postgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;
One nice thing about PGSQL is it comes with some utility binaries like **createuser** and **createdb.** So we will be making use of that.
As the default configuration of Postgres is, a user called ***postgres*** is made on and the user ***postgres*** has full superadmin access to entire PostgreSQL instance running on your OS.
$ sudo -u postgres psql
The above command gets you the psql command line interface in full admin mode.
In the following commands, keep in mind the < angular brackets > are to denote variables you have to set yourself. In the actual command, omit the <>
## Creating user
$ sudo -u postgres createuser <username>
## Creating Database
$ sudo -u postgres createdb <dbname>
## Giving the user a password
$ sudo -u postgres psql
psql=# alter user <username> with encrypted password '<password>';
## Granting privileges on database
psql=# grant all privileges on database <dbname> to <username> ;
And yeah, that should be pretty much it !
## Doing purely via psql
Your OS might not have the `createuser` or `createdb` binaries, or you may, for some reason want to do it purely via psql, then these are the three magic commands —
CREATE DATABASE yourdbname;
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass';
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser;
***Obligatory shameless self-plug :***
I am one of the co-founders of [Coding Blocks](https://cb.lk/) — A Software Programming bootcamp, based out of New Delhi, India. Among other things, we teach Full Stack Web Development using NodeJS, via both classroom programmes, as well as online classes. You can follow our Medium to find more articles on Android and Web development.
@@ -0,0 +1,163 @@
---
page-title: "DNS alias mode · acmesh-official/acme.sh Wiki"
url: https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode
date: "2023-04-06 12:49:50"
---
If your DNS provider doesn't support API access, or if you're concerned about security problems from giving the DNS API access to your main domain, then you can use DNS alias mode.
For example, your main domain is **example.com**, which doesn't have API access, or you don't want to give the API access to acme.sh, since it's important.
And you have another domain: **aliasDomainForValidationOnly.com**, which has a supported DNS API. This domain is less important, and maybe it's used for validation only.
Ok, let's start.
### 1\. First set domain CNAME:
```
_acme-challenge.example.com
=> _acme-challenge.aliasDomainForValidationOnly.com
```
or, in standard [DNS zone file](https://en.wikipedia.org/wiki/Zone_file) format, (like ISC BIND or NSD):
```
_acme-challenge.example.com IN CNAME _acme-challenge.aliasDomainForValidationOnly.com.
```
- If you are using `Cloudflare`, do set `Proxy status` as `DNS only`. DON'T set it to Proxied, it won't work!
### 2\. Issue a cert:
acme.sh --issue \\
-d example.com --challenge-alias aliasDomainForValidationOnly.com --dns dns\_cf
The Letsencrypt CA server checks the txt record of original domain `_acme-challenge.example.com` to validate your domain, but you have set the CNAME in step 1, so it goes forward to the aliased domain `_acme-challenge.aliasDomainForValidationOnly.com` to check.
And acme.sh knows that, so it just added the correct txt record to `_acme-challenge.aliasDomainForValidationOnly.com`.
So, it's done. you will get a cert for `example.com`, but you don't need to give the domain control out.
### 3\. Share the same aliased domain:
If you have multiple (sub)domains, you need add CNAME for each (sub)domain, but they can share the same aliased domain. For example, you can add the CNAME like:
\_acme-challenge.example.com
=\> \_acme-challenge.aliasDomainForValidationOnly.com
\_acme-challenge.www.example.com
=\> \_acme-challenge.aliasDomainForValidationOnly.com
\_acme-challenge.sub.example.com
=\> \_acme-challenge.aliasDomainForValidationOnly.com
\_acme-challenge.example.net
=\> \_acme-challenge.aliasDomainForValidationOnly.com
\_acme-challenge.example.org
=\> \_acme-challenge.aliasDomainForValidationOnly.com
And then issue cert like bellow:
acme.sh --issue \\
-d example.com --challenge-alias aliasDomainForValidationOnly.com --dns dns\_cf \\
-d www.example.com \\
-d sub.example.com \\
-d example.net \\
-d example.org
Even with ACME v2 wildcard cert:
acme.sh --issue \\
-d example.com --challenge-alias aliasDomainForValidationOnly.com --dns dns\_cf \\
-d example.net \\
-d example.org \\
-d \*.example.com \\
-d \*.example.net \\
-d \*.example.org
### 4\. Specify different aliased domains for each domain.
Yes, you know, acme.sh supports to set the alias domains for each domain. Even with different dns provider:
You can set CNAME like:
\_acme-challenge.example.com
=\> \_acme-challenge.aliasDomainForValidationOnly.com
\_acme-challenge.example.net
=\> \_acme-challenge.aliasDomainForValidationOnly2.com
Then issue cert:
acme.sh --issue \\
-d example.com --challenge-alias aliasDomainForValidationOnly.com --dns dns\_cf \\
-d example.net --challenge-alias aliasDomainForValidationOnly2.com
Even with different dns provider:
acme.sh --issue \\
-d example.com --challenge-alias aliasDomainForValidationOnly.com --dns dns\_cf \\
-d example.net --challenge-alias aliasDomainForValidationOnly2.com --dns dns\_gd
Let's assume the first domain `aliasDomainForValidationOnly.com` is hosted at cloudflare, and the second is hosted at godaddy.
### 5\. Mix dns alias and default dns auth
You can get a certificate with domains where you can authenticate with dns and want to mix it with domains where you need to use dns alias mode. Use `--challenge-alias no` to mark the domain that doesn't use a dns alias.
If we have direct acccess to set a txt record for \*.example.com. The domain example.net must use dns alias. For extern1.example.net set a CNAME
\_acme-challenge.extern1.example.net
=> \_acme-challenge.aliasDomainForValidationOnly.com
Then issue cert:
./acme.sh/acme.sh --issue \\
-d host1.example.com --challenge-alias no \\
-d host2.example.com --challenge-alias no \\
-d extern1.example.net --challenge-alias aliasDomainForValidationOnly.com \\
--dns dns\_infoblox
### 6\. Last
Do not remove the CNAME like : `_acme-challenge.example.com` after you issue the cert. It will be reused when acme.sh tries to renew the cert. The left cname record `_acme-challenge.example.com` doesn't harm your domain at all. Just keep it there.
### 7\. challenge-alias or domain-alias
We have another parameter: `--domain-alias`, it has the same meaning with `--challenge-alias`.
But with `--domain-alias` you don't need to add `_acme-challenge.` prefix.
For example, if you use `--challenge-alias`, you must set CNAME like bellow:
CNAME:
\_acme-challenge.A.com
=\> \_acme-challenge.B.com
Then issue cert like:
acme.sh --issue -d a.com --challenge-alias b.com --dns dns\_cf
If you use `--domain-alias`, the CNAME should be like:
CNAME:
\_acme-challenge.A.com
=\> myalias.B.com
Then issue cert like:
acme.sh --issue -d a.com --domain-alias myalias.B.com --dns dns\_cf
**Note:** Don't use the domain name only for --domain-alias.
acme.sh --issue -d a.com --domain-alias B.com --dns dns\_cf
This would require that a TXT record is created at the domain apex i.e. @ TXT "myvalidationcode". Since adding a value at the apex of a domain requires a different syntax for adding the DNS records it cannot be used in this form.
If you really want to create the validation records at the domain apex then depending on the implementation of the dns api you have to use
acme.sh --issue -d a.com --domain-alias @.B.com --dns dns\_cf
or
acme.sh --issue -d a.com --domain-alias .B.com --dns dns\_cf
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,316 @@
---
page-title: "Future Tools - Find The Exact AI Tool For Your Needs"
url: https://www.futuretools.io/
date: "2023-04-19 22:47:22"
---
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643eb43c24e3ca41a6521901_cohesive-so-logo.webp)](https://www.futuretools.io/tools/cohesive)
A suite of tools for content creation, editing and publishing.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643d9ffb5784a586534ffc36_home-page-screenshot.jpeg)](https://www.futuretools.io/tools/brightbot)
A platform to deploy and train chatbots.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643d9ff96ef58c9484d5f666_og-branding.jpeg)](https://www.futuretools.io/tools/harpa-ai)
A Google Chrome Extension automate web tasks with nocode and rpa system.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643e1d6b2d3f274e05dcc10f_dora-run-logo.png)](https://www.futuretools.io/tools/dora)
A tool to create 3D and animated websites without coding.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643d9ff7a47180ff1beb74f1_92c802bf9d78088c9de609a66a8e94ac.png)](https://www.futuretools.io/tools/vocaloid)
A tool to add lyrics and vocal melodies to music compositions.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643d9ffab28ff878929cf8f4_aws_logo_smile_1200x630.png)](https://www.futuretools.io/tools/amazon-codewhisperer)
Use Amazon's AI to help write and debug code
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643d317ee65d6248d88bf4ec_animated-drawings-logo.png)](https://www.futuretools.io/tools/animated-drawings)
A tool to bring children's drawings to life.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643d2f2f4cd40461cd0d6b7f_open-assistant-io-logo.svg)](https://www.futuretools.io/tools/open-assistant)
A conversational AI to interact with AI on consumer hardware.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643cc434b8b47fe37a28dd77_banner.png)](https://www.futuretools.io/tools/agentgpt)
A tool to create and deploy AI agents in a browser.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643cc4342932676fe1b3dce4_tradeuipreview-scaled.webp)](https://www.futuretools.io/tools/tradeui)
A platform for traders for trading signals, and more.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643cc433b8b47f3bb628db9c_image-removebg-preview__1_.png)](https://www.futuretools.io/tools/litgrades)
A tool for students to learn with flashcards.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643b6fbd4d50815442b439aa_meta.png)](https://www.futuretools.io/tools/reetail)
A platform to create ecommerce online store.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643c317cb393a746095df987_aivoicedetector-logo.png)](https://www.futuretools.io/tools/ai-voice-detector)
A tool to authenticate and filter out AI-generated voices.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643b6fbc5d1319758b0d635c_card.jpeg)](https://www.futuretools.io/tools/autory)
A tool to automate workflows with no-code.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643ae4bd92d6d968a75b3984_revocalize-ai-logo.png)](https://www.futuretools.io/tools/revocalizeai)
A tool to convert audio into vocal tracks and change voice.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643a9e0ed15ef0052d0905ff_codegeex-cn-logo.png)](https://www.futuretools.io/tools/codegeex)
A tool for coding assistant and code generation.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643a153b4b42d4860e29dfe6_logo-without-text-blue.png)](https://www.futuretools.io/tools/teachermatic)
A tool to build lesson plans.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/63dab0e75491ca6409d70585_3thlrJh41ciJu5AQVovEFgrWIbg.jpeg)](https://www.futuretools.io/tools/brancher-ai-5)
A tool to create AI-powered apps without coding.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643a15394b42d4fc8e29de8b_streamroutine-social-share-og-image.png)](https://www.futuretools.io/tools/stream-routine)
A tool to customize twitch chatbot for streamers.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643a8c2bb8c0e87f693c5057_godmode-space-logo.png)](https://www.futuretools.io/tools/godmode)
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6438830d22ee1f992438c88c_jQ9-og-image-(1).webp)](https://www.futuretools.io/tools/kapwing)
A platform for video editing.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6438830c029512800a36dfac_639334f2059d35b32e1fb6b6_Results.svg)](https://www.futuretools.io/tools/sid-search)
A neural search engine to find files, emails, and messages from any application.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6438823103d50346883c7767_vossle-logo-white-on-black-1080x1080-1.jpeg)](https://www.futuretools.io/tools/vossle-1)
A platform for creating browser-based augmented reality experiences.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/64388230e63cc480c8891571_preview.16624258.jpeg)](https://www.futuretools.io/tools/noise-eraser-0)
A solution to eliminates unwanted noise from audios and videos.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/64393c063915655ba34ab523_chatfast-io-logo.png)](https://www.futuretools.io/tools/chatfast-9)
A tool to create GPT chatbots from various data sources.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6438822ea70df24dc7a657a9_OG%2520Image.png)](https://www.futuretools.io/tools/ask-an-ai-accountant-2)
A chatbot to answer tax-related questions.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6438822d2219259e0b88d3da_https%253A%252F%252Fs3.amazonaws.com%252Fappforest_uf%252Ff1681191979794x146176450056298980%252FBRICABRAC%252520HORIZONTAL.jpeg)](https://www.futuretools.io/tools/bricabrac-ai-d)
A tool for nocode app generation.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/64393658cd7ec91b2cd5f5fe_ab-bot-logo.png)](https://www.futuretools.io/tools/abbot-6)
A tool to create chatbot assistants.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6438822cf369f4780b01fce9_1200-chatgpt-assistant.png)](https://www.futuretools.io/tools/shuffle-0)
A tool to create websites and applications.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6438822cf369f4f93d01fc49_preview.png)](https://www.futuretools.io/tools/oasis-0)
A tool to generate emails from voice commands.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6437564511f40c0da5bbbce5_anySummaryPreview4.jpeg)](https://www.futuretools.io/tools/any-summary)
A tool to summarize long documents, images and audio/video files.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6437bd072e097ca5491ed454_crear-ai-logo.svg)](https://www.futuretools.io/tools/crear-ai)
A tool for content creation assistant.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643633ee38d278f8e850c182_62f125c4ac1aca359739b739_Sturppy-open-graph.png)](https://www.futuretools.io/tools/sturppy)
A platform to build investor-ready financial models.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643633ed8e746032a0924f38_og-image.jpeg)](https://www.futuretools.io/tools/aihairstyles-com)
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6436fa8819dbad817c5cd314_gpt-4-powered-changelog-logo.png)](https://www.futuretools.io/tools/gpt-4-powered-changelog)
A tool to generate product changelogs from Jira, Linear and Github data.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6436f8d36fcf9c25d290bdbe_easychat-ai-app-logo.png)](https://www.futuretools.io/tools/easychat-ai)
A software to use chatgpt on Windows.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6436f800bd3a6420735a23a3_voicemaker-in-logo.png)](https://www.futuretools.io/tools/voicemaker)
A tool to convert text-to-speech human voices.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6436f6f7fe43d903cc29ab88_virtualstagingai-app-logo.png)](https://www.futuretools.io/tools/virtual-staging-ai)
A tool to add furniture to empty rooms images.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6436f5a90f706fef57445af5_audio-bot-logo.png)](https://www.futuretools.io/tools/audiobot)
A tool to convert text to audio in multiple languages
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643633e96910fc7a6f00d9e3_og.png)](https://www.futuretools.io/tools/toolbuilder)
A tool to generate tools for a variety of tasks.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6436f401083c7142154eda92_skinive-logo.png)](https://www.futuretools.io/tools/skinive)
An app to track skin health.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6436f34b943e82868f362e85_gptify-io-logo.png)](https://www.futuretools.io/tools/gptify)
A tool to create and embed chatbots.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6436f224f81026916de2551f_draw3d-online-logo.png)](https://www.futuretools.io/tools/draw3d)
A tool to turn sketches into photorealistic images.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643633e7828763d87411c48c_icon.png)](https://www.futuretools.io/tools/amazing-ai)
An app to generate detailed images.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6435900945bd786ebdfcfce4_doodlemorphai-logo.png)](https://www.futuretools.io/tools/doodle-morph-ai)
An art generator to turn doodles into artwork.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6434f948e3865c516afe9375_https%253A%252F%252Fs3.amazonaws.com%252Fappforest_uf%252Ff1678369668019x442932140205586370%252Fatlancer.jpeg)](https://www.futuretools.io/tools/atlancer-ai)
A directory of community developed tools to automate various tasks.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6434f94768bc15314ff1e90c_cover.png)](https://www.futuretools.io/tools/markprompt)
A tool to create GPT-4 prompts for Markdown documents.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643254b93065d52578881acc_website-builder-hero-min.png)](https://www.futuretools.io/tools/wishpond-ai)
A platform to generate websites and website builder.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643254b88ca5f9800b699ef7_2fEp1YCQ.png)](https://www.futuretools.io/tools/imagica)
A platform for no-code web app development.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6432be0205307e808dc6fbb8_logodiffusion-logo.svg)](https://www.futuretools.io/tools/logo-diffusion)
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6432b25403ac6d4109a2cdc8_ai-coustics-logo.png)](https://www.futuretools.io/tools/ai-coustics)
A tool to enhance speech from audio.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643254b503ac6d080640cf67_63f920204391703b554a27ef_promptpal.webp)](https://www.futuretools.io/tools/promptpal)
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6432b0aec8e97437ce6e287a_aiawesome-logo.png)](https://www.futuretools.io/tools/ai-awesome)
A directory for ai tools.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6430eecc59c4ed86a0cdf3bb_Ajelix-Full-Stack-Tech-Consulting-Partner-1.png)](https://www.futuretools.io/tools/ajelix)
A tool for automate excel and google spreadsheets and write scripts.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6430eeca59c4ed36facdf241_2T3Xutv6.png)](https://www.futuretools.io/tools/webscrapeai)
A no-code web scraping tool.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/6430eec8a8777374c9155021_feature.webp)](https://www.futuretools.io/tools/memecam)
A tool to create memes using image recognition.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/64316d67e3a3f0e61a9c35a3_furwee-ai-logo.png)](https://www.futuretools.io/tools/furwee)
A platform for children conversational tutoring.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642fbf645dc48025d480ff91_NOVA-PIONEERING.png)](https://www.futuretools.io/tools/nova-a-i)
A video editing tools suite.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642fbf638777c976ca463752_favicon-512.png)](https://www.futuretools.io/tools/koe-recast)
An app that transforms voices into different styles.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642fac38589e8985320f5179_Square_IAI_Logo_512x512.png)](https://www.futuretools.io/tools/interviewai)
A tool to manage interview process and generate interview questions.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642fac37cf48e0707097d4ef_text2sql-banner-2.png)](https://www.futuretools.io/tools/text2sql-ai)
A tool to generate SQL queries from plain English.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/643010ce97e54d7fa2e8c2c9_spheroid-io-logo.png)](https://www.futuretools.io/tools/spheroid)
A tool to create avatars in augmented reality
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642fac36a0d66ca288573976_followr_pp.png)](https://www.futuretools.io/tools/followr)
A platform for social media management.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642fac349df2c9b38604c4ae_favicon.png)](https://www.futuretools.io/tools/typo)
A tool for git and jira code insights.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642fc2c1c8d31c55b48d1d5f_prophotos-ai-logo.png)](https://www.futuretools.io/tools/prophotos)
A tool to turn casual photos into professional headshots.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642fac319df2c93d4e04bfe2_113eda_3aa3dd6b62464d998ab42abadf18c90a%257Emv2.png)](https://www.futuretools.io/tools/wisebot)
A tool to build chatbots.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642fac31f9727c2a6bdb15b6_wisdom%2520social%2520share%25201.jpeg)](https://www.futuretools.io/tools/wisdomai)
A tool to build chatbots.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642fb9f5c7c732ac28c611f1_cheatlayer-logo.png)](https://www.futuretools.io/tools/cheat-layer)
A nocode platform for automation.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642e789fa365323162bf2162_62a24b2ee9c3a1c876ca75bb_Untitled%2520design.png)](https://www.futuretools.io/tools/pixiebrix)
A tool to automate workflows.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642e789ef54a03f3e10a6b52_6409380524ddda787ded31f8_Frame%2520626048%2520(1)-p-1080.png)](https://www.futuretools.io/tools/augment-ai)
A tool for productivity assistance.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642ec53cff33a2500328d5c2_habitdriven-ai-logo.png)](https://www.futuretools.io/tools/habit-driven)
An app for habits and goals tracking.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642ec4786bc8aec1e155b4d4_opus-ai-logo.png)](https://www.futuretools.io/tools/opus)
A toolset for game development.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642e789b62b06bc1a37277c1_Claid_Cover1200_14dc10bb14.jpeg)](https://www.futuretools.io/tools/claid-ai)
A tool for image creation, lighting, and correcting colors.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642ec08c61f75a4ee669111e_promptstorm-app-logo.png)](https://www.futuretools.io/tools/prompt-storm)
A Google Chrome Extension with prebuilt chatgpt prompts.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642ebf707cfd87772aa2e66c_Screen%20Shot%202023-04-06%20at%206.17.17%20PM.png)](https://www.futuretools.io/tools/plask)
A tool to generate images with customizable poses.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642e789962b06b35c7727591_UgmsZKO.png)](https://www.futuretools.io/tools/adcopy-ai)
A tool to generate facebook ad copy.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642e789862b06ba9ea7274e4_TalkPal-AI-logos-1.jpeg)](https://www.futuretools.io/tools/talkpal)
An app to learn languages.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642e78975b879d52e8c7ea93_logo.png)](https://www.futuretools.io/tools/labworks)
An app for personal health assistant.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642ebc30363c2d6ac731ce94_telechat-ai-logo.webp)](https://www.futuretools.io/tools/telechat)
A tool to build chatbot for telegram.
[![](https://global-uploads.webflow.com/63994dae1033718bee6949ce/642e7894e956fd2865e83310_WbsWOpryFHY0f1qrVKIzmI8eCs.png)](https://www.futuretools.io/tools/wonderchat)
A tool to build chatbots.
@@ -0,0 +1,193 @@
---
page-title: "How To Acquire a Let's Encrypt Certificate Using DNS Validation with acme-dns-certbot on Ubuntu 18.04 | DigitalOcean"
url: https://www.digitalocean.com/community/tutorials/how-to-acquire-a-let-s-encrypt-certificate-using-dns-validation-with-acme-dns-certbot-on-ubuntu-18-04
date: "2023-04-06 08:56:39"
---
*The author selected the [COVID-19 Relief Fund](https://www.brightfunds.org/funds/write-for-donations-covid-19-relief-fund) to receive a donation as part of the [Write for DOnations](https://do.co/w4do-cta) program.*
### Introduction
The majority of [Lets Encrypt](https://letsencrypt.org/) certificates are issued using HTTP validation, which allows for the easy installation of certificates on a single server. However, HTTP validation is not always suitable for issuing certificates for use on load-balanced websites, nor can it be used to issue [wildcard certificates](https://en.wikipedia.org/wiki/Wildcard_certificate).
DNS validation allows for certificate issuance requests to be verified using DNS records, rather than by serving content over HTTP. This means that certificates can be issued simultaneously for a cluster of web servers running behind a load balancer, or for a system that isnt directly accessible over the internet. Wildcard certificates are also supported using DNS validation.
The [acme-dns-certbot](https://github.com/joohoi/acme-dns-certbot-joohoi) tool is used to connect [Certbot](https://certbot.eff.org/) to a third-party DNS server where the certificate validation records can be set automatically via an API when you request a certificate. The advantage of this is that you dont need to integrate Certbot directly with your DNS provider account, nor do you need to grant it unrestricted access to your full DNS configuration, which is beneficial to security.
Delegated [DNS zones](https://www.digitalocean.com/community/tutorials/an-introduction-to-dns-terminology-components-and-concepts#zone-files) are used in order to redirect lookups for the certificate verification records to the third-party DNS service, so once the initial setup has been completed, you can request as many certificates as you want without having to perform any manual validation.
Another key benefit of acme-dns-certbot is that it can be used to issue certificates for individual servers that may be running behind a load balancer, or are otherwise not directly accessible over HTTP. Traditional HTTP certificate validation cannot be used in these cases, unless you set the validation files on each and every server. The acme-dns-certbot tool is also useful if you want to issue a certificate for a server that isnt accessible over the internet, such as an internal system or staging environment.
In this tutorial, you will use the acme-dns-certbot hook for Certbot to issue a Lets Encrypt certificate using DNS validation.
## Prerequisites
To complete this tutorial, you will need:
- An Ubuntu 18.04 server set up by following the [Initial Server Setup with Ubuntu 18.04](https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04), including a sudo non-root user.
- A domain name for which you can acquire a TLS certificate, including the ability to add DNS records. In this particular example, we will use `your-domain` and `subdomain.your-domain`, as well as `*.your-domain` for a wildcard certificate. However this can be adjusted for other domain, subdomains, or wildcards if required.
Once you have these ready, log in to your server as your non-root user to begin.
## Step 1 — Installing Certbot
In this step, you will install Certbot, which is a program used to issue and manage Lets Encrypt certificates.
Certbot is available within the official Ubuntu Apt repositories, however, it is instead recommended to use the repository maintained by the Certbot developers, as this always has the most up-to-date version of the software.
Begin by adding the Certbot repository:
Youll need to press `ENTER` to accept the prompt and add the new repository to your system.
Next, install the Certbot package:
Once the installation has completed, you can check that Certbot has been successfully installed:
This will output something similar to the following:
```
Outputcertbot 0.31.0
```
In this step you installed Certbot. Next, you will download and install the acme-dns-certbot hook.
## Step 2 — Installing acme-dns-certbot
Now that the base Certbot program has been installed, you can download and install acme-dns-certbot, which will allow Certbot to operate in DNS validation mode.
Begin by downloading a copy of the script:
Once the download has completed, mark the script as executable:
Then, edit the file using your favorite text editor and adjust the first line in order to force it to use Python 3:
Add a `3` to the end of the first line:
acme-dns-certbot.py
```
#!/usr/bin/env python3
. . .
```
This is required in order to ensure that the script uses the latest supported version of Python 3, rather than the legacy Python version 2.
Once complete, save and close the file.
Finally, move the script into the Certbot Lets Encrypt directory so that Certbot can load it:
In this step, you downloaded and installed the acme-dns-certbot hook. Next, you can begin the setup process and work toward issuing your first certificate.
## Step 3 — Setting Up acme-dns-certbot
In order to begin using acme-dns-certbot, youll need to complete an initial setup process and issue at least one certificate.
Start by running Certbot to force it to issue a certificate using DNS validation. This will run the acme-dns-certbot script and trigger the initial setup process:
You use the `--manual` argument to disable all of the automated integration features of Certbot. In this case youre just issuing a raw certificate, rather than automatically installing it on a service as well.
You configure Certbot to use the acme-dns-certbot hook via the `--manual-auth-hook` argument. You run the `--preferred-challenges` argument so that Certbot will give preference to DNS validation.
You must also tell Certbot to pause before attempting to validate the certificate, which you do with the `--debug-challenges` argument. This is to allow you to set the DNS [`CNAME` record(s)](https://www.digitalocean.com/community/tutorials/an-introduction-to-dns-terminology-components-and-concepts#record-types) required by acme-dns-certbot, which is covered later in this step. Without the `--debug-challenges` argument, Certbot wouldnt pause, so you wouldnt have time to make the required DNS change.
Remember to substitute each of the domain names that you wish to use using `-d` arguments. If you want to issue a wildcard certificate, make sure to escape the asterisk (`*`) with a backslash (`\`).
After following the standard Certbot steps, youll eventually be prompted with a message similar to the following:
```
Output...
Output from acme-dns-auth.py:
Please add the following CNAME record to your main DNS zone:
_acme-challenge.your-domain CNAME a15ce5b2-f170-4c91-97bf-09a5764a88f6.auth.acme-dns.io.
Waiting for verification...
...
```
Youll need to add the required DNS `CNAME` record to the DNS configuration for your domain. This will delegate control of the `_acme-challenge` subdomain to the ACME DNS service, which will allow acme-dns-certbot to set the required DNS records to validate the certificate request.
If youre using DigitalOcean as your DNS provider, you can set the DNS record within your control panel:
![A screenshot of the DigitalOcean DNS control panel, showing an example of a CNAME record for ACME DNS](https://assets.digitalocean.com/articles/acme_dns_certbot_1804/CNAME.png)
It is recommended to set the TTL (time-to-live) to around 300 seconds in order to help ensure that any changes to the record are propagated quickly.
Once you have configured the DNS record, return to Certbot and press `ENTER` to validate the certificate request and complete the issuance process.
This will take a few seconds, and youll then see a message confirming that the certificate has been issued:
```
Output...
Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/your-domain/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/your-domain/privkey.pem
...
```
Youve run acme-dns-certbot for the first time, set up the required DNS records, and successfully issued a certificate. Next youll set up automatic renewals of your certificate.
## Step 4 — Using acme-dns-certbot
In this final step, you will use acme-dns-certbot to issue more certificates and renew existing ones.
Firstly, now that youve successfully issued at least one certificate using acme-dns-certbot, you can continue to issue certificates for the same DNS names without having to add another DNS `CNAME` record. However, if you wish to acquire a certificate for a different subdomain or entirely new domain name, you will be prompted to add another `CNAME` record.
For example, you could issue another standalone wildcard certificate without having to perform the verification again:
However, if you were to attempt to issue a certificate for a subdomain, you would be prompted to add a `CNAME` record for the subdomain:
This will show an output similar to the initial setup that you carried out in Step 3:
```
Output...
Please add the following CNAME record to your main DNS zone:
_acme-challenge.subdomain.your-domain CNAME 8450fb54-8e01-4bfe-961a-424befd05088.auth.acme-dns.io.
Waiting for verification...
...
```
Now that youre able to use acme-dns-certbot to issue certificates, its worth considering the renewal process as well.
Once your certificates are nearing expiry, Certbot can automatically renew them for you:
The renewal process can run start-to-finish without user interaction, and will remember all of the configuration options that you specified during the initial setup.
To test that this is working without having to wait until nearer the expiry date, you can trigger a dry run. This will simulate the renewal process without making any actual changes to your configuration.
You can trigger a dry run using the standard `renew` command, but with the `--dry-run` argument:
This will output something similar to the following, which will provide assurance that the renewal process is functioning correctly:
```
Output...
Cert not due for renewal, but simulating renewal for dry run
Plugins selected: Authenticator manual, Installer None
Renewing an existing certificate
Performing the following challenges:
dns-01 challenge for your-domain
dns-01 challenge for your-domain
Waiting for verification...
Cleaning up challenges
...
```
In this final step, you issued another certificate and then tested the automatic renewal process within Certbot.
## Conclusion
In this article you set up Certbot with acme-dns-certbot in order to issue certificates using DNS validation. This unlocks the possibility of using wildcard certificates as well as managing a large estate of distinct web servers that may be sitting behind a load balancer.
Make sure to keep an eye on the [acme-dns-certbot repository](https://github.com/joohoi/acme-dns-certbot-joohoi) for any updates to the script, as its always recommended to run the latest supported version.
If youre interested in learning more about acme-dns-certbot, you may wish to review the documentation for the acme-dns project, which is the server-side element of acme-dns-certbot:
- [acme-dns on GitHub](https://github.com/joohoi/acme-dns#acme-dns)
The acme-dns software can also be self-hosted, which may be beneficial if youre operating in high-security or complex environments.
Alternatively, you could dig into the technical details of ACME DNS validation by reviewing the relevant section of the official RFC document which outlines how the process works:
- [RFC8555 - Section 8.4](https://tools.ietf.org/html/rfc8555#section-8.4)
@@ -0,0 +1,659 @@
---
page-title: "How to Install ROCm"
url: https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/How_to_Install_ROCm.html
date: "2023-04-23 18:20:24"
---
## How to Install ROCm
You may use the following installation methods to install ROCm:
•        Installer script method
•        Package manager method
## Installer Script Method
The installer script method automates the installation process for the AMDGPU and ROCm stack. The installer script handles the complete installation process for ROCm, including setting up the repository, cleaning the system, updating, and installing the desired drivers and meta-packages. With this approach, the system has more control over the ROCm installation process. Thus, those who are less familiar with the Linux standard commands can choose this method for ROCm installation.
For AMDGPU and ROCm installation using the installer script method on Linux distribution, follow these steps:
1.     **Meet** **p****rerequisites** Ensure the [Prerequisites](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/Prerequisites.html) are met before downloading and installing the installer using the installer script method.
2.     **Download and** **i****nstall the** **i****nstaller** Ensure you download and install the installer script from the recommended URL.
NOTE:
The installer package is updated periodically to resolve known issues and add new features. The links for each Linux distribution always point to the latest available build.
**3.**     **Us****e** **the** **i****nstaller** **s****cript on Linux** **d****istributions** Ensure you execute the script for installing use cases.
### Download and Install the Installer
To download the amdgpu-install script on the system, use the following commands.
#### Downloading and Installing the Installer Script on Ubuntu
##### **Ubuntu** **v****20.04**
To download and install the installer, use the following commands:
##### **Ubuntu** **v****2****2****.04**
To download and install the installer, use the following commands:
#### Downloading and Installing the Installer Script on RHEL
##### **RHEL v8.6**
To download and install the installer for RHEL v8.6 distribution, type the following command:
##### **RHEL** **v****8.****7**
To download and install the installer for RHEL v8.7 distribution, type the following command:
##### **RHEL v****9.****1**
To download and install the installer for RHEL v9.1 distribution, type the following command:
#### Downloading and Installing the Installer Script on **SLES 15**
To download and install the installer on SLES, type the following command:
##### **SLES 15 Service Pack** **4**
### Using the Installer Script for Single-version ROCm Installation
To install use cases specific to your requirements, use the installer amdgpu\-install as follows:
•        To install a single use case:
•        To install kernel-mode driver:
•        To install multiple use cases:
•        To display a list of available use cases:
NOTE:
The list in this section represents only a sample of available use cases for ROCm:
Following is a sample of output listed by the command above:
NOTE:
Adding -y as a parameter to amdgpu\-install skips user prompts (for automation). **Ex****ample****:**
amdgpu\-install -y \--usecase\=rocm 
### Using Installer Script in Docker
When the installation is initiated in Docker, the installer tries to install the use case along with the kernel-mode driver. However, you cannot install the kernel-mode driver in a Docker container. To skip the installation of the kernel-mode driver, proceed with the \--no-dkms option, as shown below:
### Using the Installer Script for Multiversion ROCm Installation
The multiversion ROCm installation requires you to download and install the latest ROCm release installer from the list of ROCm releases you want to install simultaneously on your system.
**E****xample****:** If you want to install ROCm releases 4.5.0, 4.5.1, and 5.4.3 simultaneously, you are required to download the installer from the latest ROCm release v5.4.3.
To download and install the installer, refer to the [Download and Install the Installer](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/How_to_Install_ROCm.html#d23e234) section.
NOTE:
If the existing ROCm release contains non-versioned ROCm packages, uninstall those packages before proceeding with the multiversion installation to avoid conflicts.
#### Add Required ROCm Repositories
Add the required repositories using the following steps:
NOTE:
Add the AMDGPU and ROCm repositories manually for all ROCm releases you want to install except the latest one. The amdgpu\-install script automatically adds the required repositories for the latest release.
##### Adding ROCm Repositories on Ubuntu
Add the ROCm repositories for the releases you want to install by choosing <Release\-1 specific rocm baseurl\> and <Release\-2 specific rocm baseurl\> from the given [Base URLs for AMDGPU and ROCm Stack Repositories](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/How_to_Install_ROCm.html#d23e2075):
**Ubuntu v20.04**
**Ubuntu v22.04**
##### Adding ROCm Repositories on RHEL
To add the desired ROCm repositories, follow these steps:
1.     Create a /etc/yum.repos.d/rocm.repo file with the following content:
2. To clean the cached files from enabled repositories, execute the command below:
##### Adding ROCm Repositories on SLES/OpenSUSE
To add new ROCm repositories for the releases you want to install, follow these steps.
1.     Create a /etc/zypp/repos.d/amdgpu.repo file with the following content:
2.     To update the added repositories, use the following command:
#### Use the Installer to Install Multiversion ROCm Meta-packages
Use the installer script as given below:
NOTE:
If the kernel-mode driver is already present on the system and you do not want to upgrade it, use the \--no-dkms option to skip the installation of the kernel-mode driver, as shown in the following samples:
•        sudo amdgpu-install --usecase=rocm --rocmrelease=4.5.0 --no-dkms
•        sudo amdgpu-install --usecase=rocm --rocmrelease=5.4.3 --no-dkms
Following are examples of ROCm multiversion installation. The kernel-mode driver, associated with the ROCm release v5.4.3, will be installed as its latest release in the list.
•        sudo amdgpu-install --usecase=rocm --rocmrelease=4.5.0
•        sudo amdgpu-install --usecase=rocm --rocmrelease=4.5.2
•        sudo amdgpu-install --usecase=rocm --rocmrelease=5.4.3
## Package Manager Method
The package manager method involves a manual setup of the repository, which includes setting up the repository, updating, and installing/uninstalling meta-packages. This involves using standard commands such as yum, apt, and others respective to the Linux distribution.
The functions of a package manager installation system are:
•        Grouping packages based on function
•        Extracting package archives
•        Ensuring a package is installed with all necessary packages and dependencies are managed
•        From a remote repository, looking up, downloading, installing, or updating existing packages
•        Ensuring the authenticity and integrity of the package
### Installing ROCm on Linux Distributions
For a fresh ROCm installation using the package manager method on a Linux distribution, follow the steps below:
1.     **Meet** **p****rerequisites** Ensure the [Prerequisites](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/Prerequisites.html) are met before the ROCm installation.
2.     **Install kernel headers and development packages** Ensure kernel headers and development packages are installed on the system.
3.     **Select the** **b****ase URL****s for** **AMDGPU** **and** **ROCm** **stack repository** Ensure the base URLs for AMDGPU and ROCm stack repositories are selected.
4.     **Add** **the** **AMDGPU** **s****tack** **r****epositor****y** Ensure the AMDGPU stack repository is added.
5.     **Install** **the** **k****ernel-mode** **driver and reboot the system** Ensure the kernel-mode driver is installed and the system is rebooted.
6.     **Add** **ROCm** **stack repository** Ensure the ROCm stack repository is added.
7.     **Install** **single-version** **or** **multiversion** **ROCm** **meta-packages** Install the desired meta-packages.
8.     **Verify installation** **for the applicable distributions** Verify if the installation is successful.
NOTE:
You cannot install a kernel-mode driver in a Docker container. Refer to the sections below for specific commands to install the AMDGPU and ROCm stack on various Linux distributions.
### Understanding the Release-specific AMDGPU and ROCm Stack Repositories on Linux Distributions
The release-specific repositories consist of packages from a specific release of the AMDGPU stack and ROCm stack. The repositories are not updated for the latest packages with subsequent releases. When a new ROCm release is available, the new repository, specific to that release, is added. You can select a specific release to install, update the previously installed single version to the later available release, or add the latest version of ROCm along with the currently installed version by using the multiversion ROCm packages.
NOTE:
Users installing multiple versions of the ROCm stack must use the release-specific base URL.
### Using Package Manager on Ubuntu
To install ROCm on the Ubuntu systems, follow these steps.
#### Installation of Kernel Headers and Development Packages on Ubuntu
The following instructions to install kernel headers and development packages apply to all versions and kernels of Ubuntu. The ROCm installation requires you to install the Linux-headers and Linux-modules-extra package with the correct version corresponding to the kernel's version.
**E****xample****:** If the system is running the Linux kernel version 5.15.0-41-generic, you must install the identical versions of Linux-headers and development packages. Refer to the [Kernel Information](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/Prerequisites.html) section to check the system's kernel version.
To check the kernel-headers and linux-modules-extra package versions, follow these steps:
1.     For the Ubuntu/Debian environment, execute the following command to verify the kernel headers and development packages are installed with the respective versions:
The command indicates if there are Linux headers installed as shown below:
2.     Execute the following command to check whether the development packages are installed:
The command mentioned above lists the installed linux-modules-extra packages like the output below:
3.     If the supported version installation of Linux headers and development packages are not installed on the system, execute the following command to install the packages:
#### Base URLs for AMDGPU and ROCm Stack Repositories
The following URLs point to the release-specific AMDGPU and ROCm repositories:
##### Ubuntu v20.04/22.04
amdgpu base URL= [https://repo.radeon.com/amdgpu/5.4.3/ubuntu](https://repo.radeon.com/amdgpu/5.4.3/ubuntu)                 
rocm base URL= [https://repo.radeon.com/rocm/apt/5.4.3](https://repo.radeon.com/rocm/apt/5.4.3)                
#### Adding the AMDGPU Stack Repository
##### Add GPG Key for AMDGPU and ROCm Stack
Add the gpg key for AMDGPU and ROCm repositories. For Debian-based systems like Ubuntu, configure the Debian ROCm repository as follows:
NOTE:
The gpg key may change; ensure it is updated when installing a new release. If the key signature verification fails while updating, re-add the key from the ROCm to the apt repository as mentioned above. The current rocm.gpg.key is not available in a standard key ring distribution but has the following sha1sum hash:
##### Add the AMDGPU Stack Repository
**If:**
**Then:**
You have a version of the kernel-mode driver installed
Skip this section.
You do not have a version of the kernel-mode driver installed
Follow the commands below to add the AMDGPU stack repository.
**Ubuntu** **v****20.04**
**Ubuntu v22.04**
To update the package list, execute the command below:
#### Install the Kernel-mode Driver and Reboot System
**If:**
**Then:**
You have the kernel-mode driver installed on your system
Skip this section.
You do not have the kernel-mode driver on your system
Follow the instructions below.
1.     Install the kernel-mode driver.
2.     Reboot the system.
#### Add ROCm Stack Repository
To add the ROCm repository, use the following steps:
**Ubuntu v20.04**
**Ubuntu v2****2****.04**
#### Install ROCm Meta-packages
This section provides the instructions for single-version and multiversion ROCm packages installation.
##### Single-version ROCm Packages Installation
Install ROCm meta-packages. Specify the name of the meta-package you want to install as <package-name>, as shown below:
**E****xample:**
•        sudo apt install rocm-hip-sdk
•        sudo apt install rocm-hip-sdk rocm-opencl-sdk
##### ROCm Packages Installation
To install multiversion ROCm packages, execute the following steps:
NOTE:
If the existing ROCm release contains non-versioned ROCm packages, you must uninstall those packages before proceeding to the multiversion installation to avoid conflicts.
**Adding** **N****ew** **ROCm** **R****epositor****ies**
Add the ROCm repository using the following steps. Choose <Release\-1 specific rocm baseurl\> and <Release\-2 specific rocm baseurl\> from the given [Base URLs for AMDGPU and ROCm Stack Repositories](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/How_to_Install_ROCm.html#d23e2075):
**Ubuntu v20.04**
**Ubuntu v2****2****.04**
NOTE:
You must repeat the step above to add the repository for each release you want to install.
**Installing** **Multiversion** **ROCm** **Package**
Install the desired packages using the command below:
**E****xample****:**
•        sudo apt install rocm-hip-sdk4.5.0 rocm-hip-sdk5.4.3
#### Verify the Installation
To verify if the installation is successful, refer to the [Post-install Actions and Verification Process](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/How_to_Install_ROCm.html#d23e6230) section.
### Using Package Manager on RHEL
To install ROCm on RHEL systems, follow these steps.
#### Installation of Kernel Headers and Development Packages on RHEL
The ROCm installation requires that you install the kernel headers and linux-modules-extra package with the correct version corresponding to the kernel's version.
**E****xample****:** If the system is running Linux kernel version 3.10.0-1160.el7.x86\_64, you must install the identical versions of kernel headers and development packages.
NOTE:
To check the kernel version on your system, refer to the [Kernel Information](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/Prerequisites.html) section.
To check the kernel headers and linux-modules-extra package versions, follow these steps:
1.     To verify you have the supported version of the installed kernel headers, type the following on the command line:
The command mentioned above displays the list of kernel headers versions currently present on your system. Verify if the listed kernel headers have the same versions as the kernel.
2.     The following command lists the development packages on your system. Verify if the listed development package's version number matches the kernel version number:
3.     If the supported version installation of kernel headers and development packages does not exist on the system, execute the command below to install:
#### Base URLs for AMDGPU and ROCm Stack Repositories
The following URLs point to the release-specific AMDGPU and ROCm repositories:
##### RHEL v8.6
amdgpu base URL= [https://repo.radeon.com/amdgpu/5.4.3/rhel/8.6/main/x86\_64/](https://repo.radeon.com/amdgpu/5.4.3/rhel/8.6/main/x86_64/)               
rocm base URL= [https://repo.radeon.com/rocm/rhel8/5.4.3/main/](https://repo.radeon.com/rocm/rhel8/5.4.3/main/)                  
##### RHEL v8.7
amdgpu base URL= [https://repo.radeon.com/amdgpu/5.4.3/rhel/8.7/main/x86\_64](https://repo.radeon.com/amdgpu/5.4.3/rhel/8.7/main/x86_64)           
rocm base URL= [https://repo.radeon.com/rocm/rhel8/5.4.3/main/](https://repo.radeon.com/rocm/rhel8/5.4.3/main/)        
##### RHEL v9.1
amdgpu base URL= [https://repo.radeon.com/amdgpu/5.4.3/rhel/9.1/main/x86\_64](https://repo.radeon.com/amdgpu/5.4.3/rhel/9.1/main/x86_64)           
rocm base URL= [https://repo.radeon.com/rocm/rhel9/5.4.3/main/](https://repo.radeon.com/rocm/rhel9/5.4.3/main/)        
#### Adding the AMDGPU Stack Repository
**If:**
**Then:**
You have a kernel-model driver installed
Skip this section.
You do not have a version of the kernel-mode driver installed
Follow the commands below to add the AMDGPU stack repository.
To add the AMDGPU stack repository, follow these steps:
1.     Create a /etc/yum.repos.d/amdgpu.repo file with the following content. For <amdgpu baseurl\>  in the command below, refer to the AMDGPU base URLs as documented in the [Base URLs for AMDGPU and ROCm Stack Repositories](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/How_to_Install_ROCm.html#d23e2474):
NOTE:
The gpg key may change; ensure it is updated when installing a new release. If the key signature verification fails while updating, re-add the key from the ROCm to the yum repository as mentioned above. The current rocm.gpg.key is not available in a standard key ring distribution but has the following sha1sum hash:
2.     To clean the cached files from enabled repositories, execute the command below:
#### Install the Kernel-mode Driver and Reboot System
**If:**
**Then:**
The kernel-mode driver is installed on your system
Skip this section.
You do not have a version of the kernel-mode driver installed
Follow the command below to install the kernel-mode driver.
After the completion of driver installation, reboot the system:
#### Add the ROCm Stack Repository
To add the ROCm stack repository, execute these steps:
1.     Create a /etc/yum.repos.d/rocm.repo file with the following content.
For <rocm baseurl\> in the command below, refer to the ROCm base URLs documented in [Base URLs for AMDGPU and ROCm Stack Repositories](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/How_to_Install_ROCm.html#d23e2474):
NOTE:
The gpg key may change; ensure it is updated when installing a new release. If the key signature verification fails while updating, re-add the key from the ROCm yum repository as mentioned above. The current rocm.gpg.key is not available in a standard key ring distribution but has the following sha1sum hash:
2.      To clean the cached files from enabled repositories, execute the command below:
#### Install ROCm Meta-packages
You can install either single-version or multiversion ROCm meta-packages using the following commands.
##### ROCm Packages Installation
Use the following command to install the ROCm packages:
Specify the meta-package name as <package-name>, which you want to install, in the command given above.
**E****xample****:**
•        sudo yum install rocm-hip-sdk
•        sudo yum install rocm-hip-sdk rocm-opencl-sdk
##### ROCm Meta-packages Installation
To install multiversion ROCm packages, execute the following steps.
NOTE:
If the existing ROCm release contains non-versioned ROCm packages, uninstall those packages before proceeding to the multiversion installation to avoid conflicts.
**Adding** **N****ew** **ROCm** **R****epositories**
To add the ROCm stack repositories, follow these steps:
1.     Create a /etc/yum.repos.d/rocm.repo file with the following content:
NOTE:
You must repeat the step above to add the repository for each release you want to install.
2.     To clean the cached files from enabled repositories, execute the command below:
**Installing** **Multiversion** **ROCm** **Meta-****p****ackage**
To install the required meta-packages, use the following commands:
**E****xample:**
•        sudo yum install rocm-hip-sdk4.5.0 rocm-hip-sdk5.4.3
#### Verify the Installation
To verify if the installation is successful, refer to the [Post-install Actions and Verification Process](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/How_to_Install_ROCm.html#d23e6230) section.
### Using Package Manager on SLES/OpenSUSE
This section introduces the ROCm installation process on SLES/OpenSUSE.
#### Installation of Kernel Headers and Development Packages
ROCm installation requires you to install linux-headers and linux-modules-extra package with the correct version corresponding to the kernel's version.
**Example:** If the system is running the Linux kernel version 5.3.18-57\_11.0.18, you must install the same versions of linux-headers and development packages.
NOTE:
To check the kernel version on your system, refer to the [Kernel Information](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/Prerequisites.html#d5427e109) section.
To check the kernel-headers and linux-modules-extra package versions, follow these steps:
**1.**     Ensure that the correct version of the latest kernel-default-devel and kernel-default packages are installed. The following command lists the installed kernel-default-devel and kernel-default package:
NOTE:
This next step is only required if you find from the above command that the kernel-default-devel and kernel-default versions of the package, corresponding to the kernel release version, do not exist on your system.
2.     If the required version of packages does not exist on the system, install with the command below:
#### Base URLs for AMDGPU and ROCm Stack Repositories
The following URLs point to the release-specific AMDGPU and ROCm repositories:
##### SLES 15 Service Pack 4
amdgpu base URL= [https://repo.radeon.com/amdgpu/5.4.3/sle/15.4/main/x86\_64](https://repo.radeon.com/amdgpu/5.4.3/sle/15.4/main/x86_64)            
rocm base URL= [https://repo.radeon.com/rocm/zyp/5.4.3/main/](https://repo.radeon.com/rocm/zyp/5.4.3/main/)              
#### Adding the AMDGPU Stack Repository
**If:**
**Then:**
You have a version of the kernel-mode driver installed
Skip this section.
You do not have a version of the kernel-mode driver installed
Follow the commands below to add the AMDGPU stack repository.
To add the AMDGPU stack repository, follow these steps:
1.     Create a /etc/zypp/repos.d/amdgpu.repo file with the following content:
NOTE:
The gpg key may change; ensure it is updated when installing a new release. If the key signature verification fails while updating, re-add the key from the ROCm zypp repository as mentioned above. The current rocm.gpg.key is not available in a standard key ring distribution but has the following sha1sum hash:
2.     To update the added repository, use the following command:
#### Install the Kernel-mode Driver and Reboot System
**If:**
**Then:**
You already have a version of the kernel-mode driver installed
Skip this section.
You do not have a version of the kernel-mode driver installed
Follow the commands below to install and reboot the system.
#### Add the ROCm Stack Repository
Add the ROCm repository by executing the following commands:
1.     Create a /etc/zypp/repos.d/rocm.repo file with the following content:
NOTE:
The gpg key may change. Ensure it is updated when installing a new release. If the key signature verification fails while updating, re-add the key from the ROCm zypp repository as mentioned above. The current rocm.gpg.key is not available in a standard key ring distribution but has the following sha1sum hash:
2.     To update the added repository, use the following command:
#### Install ROCm Meta-packages
##### Single-version ROCm Packages Installation
For single-version ROCm packages installation, follow these steps:
1.     Install the ROCm package by typing the command below:
2.     Specify the name of the meta-package as <package-name>, which you want to install, in the command given above.
**Example:**
•        sudo zypper --gpg-auto-import-keys install rocm-hip-sdk
•        sudo zypper --gpg-auto-import-keys install rocm-hip-sdk rocm-opencl-sdk
##### ROCm Packages Installation
To install multiversion ROCm packages, execute the following steps.
NOTE:
If the existing ROCm release contains non-versioned ROCm packages, uninstall those packages before proceeding to the multiversion installation to avoid conflicts.
**Adding** **N****ew** **ROCm** **R****epositor****ies**
To add the ROCm stack repositories, follow these steps.
1.     Add new ROCm repositories for the release you want to install simultaneously. Create a /etc/zypp/repos.d/rocm.repo file with the following content:
Select the <Release\-1 specific rocm baseurl\> and <Release-2 specific rocm baseurl\> from [Base URLs for AMDGPU and ROCm Stack Repositories:](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/Prerequisites.html#d5427e109)
NOTE:
You must repeat the step above to add the repository for each release you want to install.
2.     To update the added repositories, use the following command:
**Installing** **Multiversion** **ROCm** **P****ackage**
Install ROCm meta-packages using the command below:
**E****xample:**
•        sudo zypper --gpg-auto-import-keys install rocm-hip-sdk4.5.0 rocm-hip-sdk5.4.3
#### Verify the Installation
To verify if the installation is successful, refer to the [Post-install Actions and Verification Process](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/How_to_Install_ROCm.html#d23e6230) section.
## Post-install Actions and Verification Process
Execute post-install actions and verify ROCm installation using the following steps.
### Post-install Actions
You might set LD\_LIBRARY\_PATH to load the desired ROCm library version:
NOTE:
For convenience, you may also add the ROCm binaries in your PATH, as shown in the example below:
### Verifying Kernel-mode Driver Installation
Check the installation of the kernel-mode driver by typing the command given below:
### Verifying ROCm Installation
After completing the ROCm installation, execute the following commands on the system to verify if the installation is successful. If you see your GPUs listed by both commands, the installation is considered successful:
### Verifying Package Installation
To ensure the packages are installed successfully, use the following commands:
**Table** **4****.** **Commands to** **V****erify** **I****nstalled** **P****ackages**
**Linux Distro**
**Command**
Ubuntu/Debian
sudo apt list --installed
RHEL
sudo yum list installed
SLES /OpenSUSE
sudo zypper search --installed-only
@@ -0,0 +1,122 @@
---
page-title: "How to install PostgreSQL on Debian 11"
url: https://linuxhint.com/install-postgresql-debian/
date: "2023-04-19 14:24:01"
---
PostgreSQL (also known as postgres/POSTGRES) is an open-source and advanced level Relational Database Management System (RDBMS). In this post, we have provided the guide to install PostgreSQL on Debian 11: before installation, lets have a quick look at the features support of PostgreSQL:
## **Notable Features of PostgreSQL**
PostgreSQL supports some distinctive features that allow large scale organizations to adopt it for data processing. Some notable features are listed below:
- **Programming Language:** Extensive support of programming languages that includes Python, Java, C#, Perl, Go.
- **Data Types:** It has huge support of pre-defined datasets while users can create their own data type as well.
- **SQL integration:** Several advanced level features are compatible with PostgreSQL: such as, complex subqueries, table partitioning, nested transactions
- **Security:** For secure processing of data, PostgreSQL uses authentication protocols like Lightweight Directory Access Protocol (LDAP), and provides row/column security as well.
To install PostgreSQL on Debian 11; you can follow any of the following two methods:
**Method 1:** Install PostgreSQL using repository of Debian 11
**Method 2:** Install PostgreSQL using official PostgreSQL repository
We will explain the installation process using both methods: the first method uses the packages from Debian repository whereas the second method will fetch the repository packages from PostgreSQL official package:
## **Method 1: How to install PostgreSQL using repository of Debian 11**
The installation method will direct you to install PostgreSQL using a simple and time saving process by using Debian packages:
**Step 1: Update and Upgrade the packages list
**It is recommended to update and upgrade the list of packages by issuing the commands mentioned below:
$ sudo apt update && sudo apt upgrade
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-01.png)
**Step 2: Install PostgreSQL
**The required package resides in Debian repository so you can install it by using “**apt**”: install PostgreSQL by issuing the command mentioned below:
$ sudo apt install postgresql postgresql-contrib
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-02.png)
Once PostgreSQL is installed, you can check the status of service by using the command given below:
$ sudo systemctl status PostgreSQL
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-03.png)
Moreover, the status of service can be changed by using the following commands:
To stop the running PostgreSQL service:
$ sudo systemctl stop PostgreSQL
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-04.png)
And to start the stopped service:
$ sudo systemctl start PostgreSQL
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-05.png)
## **Method 2: How to install PostgreSQL using official repository of Debian 11**
Follow the simple steps mentioned below to add the official repository of PostgreSQL for Debian 11 and then install it; you can follow the steps mentioned below to do so:
**Step 1: Add PostgreSQL repository
**It is recommended to add the official repo of PostgreSQL, so that you get the latest version of packages: firstly, you have to add the GPG signing key of PostgreSQL packages to secure the package repository: you can do so by issuing the command mentioned below:
$ curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /usr/share/keyrings/postgresql-keyring.gpg
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-06.png)
Now, you are ready to add PostgreSQL repository: use the command mentioned below to perform the action:
$ echo "deb \[signed-by=/usr/share/keyrings/postgresql-keyring.gpg\] http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" | sudo tee /etc/apt/sources.list.d/postgresql.list
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-07.png)
**Step 2: Installation of PostgreSQL
**After successful integration of PostgreSQL library you are ready to install it: but before this, it is recommended to update the systems repository by using the command mentioned below:
Install PostgreSQL with the help of below-mentioned command:
$ sudo apt install PostgreSQL
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-08.png)
## **How to create database using PostgreSQL in Debian 11**
PostgreSQL can be used as a postgres user only, if you set a password; otherwise you will not be able to log in as a postgres user: Use the following command to set up a password:
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-09.png)
To create database in PostgreSQL, you must login to PostgreSQL server and then access its shell; use the following command to log in as a postgres user: it will ask for password; type your password and hit enter:
Now access the shell using postgres user by issuing the following keyword:
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-10.png)
Once you have accessed the command shell of Postgres, you can now use SQL queries to perform several database related operations:
For instance, we want to create a database “**linuxhint**”; for that, we will use the following SQL query to do so:
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-11.png)
To access the database log in as postgres user and use the following command to access database “**linuxhint**”:
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-12.png)
**Note:** You can fall back to the postgres user by using “**\\q**”:
You can now add, delete, select data from the database by accessing the database on terminal. Moreover, to drop a database you have to come out of database by using “**\\q**” and then use the following command:
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-13.png)
And if you try to access database “**linuxhint**”; the shell will display an error that “**linuxhint**” does not exists:
![](https://linuxhint.com/wp-content/uploads/2021/10/install-postgresql-debian-14.png)
## **Conclusion**
PostgreSQL is a widely used Relational Database Management System used by several large companies ranging from large to medium size strength. Although it is a relational database it supports JSON for non-relational querying that makes PostgreSQL a favorite choice of organizations. This post provides the installation guide of PostgreSQL for Debian11, two methods are described here. Method 1 enables you to install PostgreSQL from Debian owns packages repository, on the other hand you can follow Method 2 to get the updated PostgreSQL from its official repository.
@@ -0,0 +1,170 @@
---
page-title: "How to install and run bots for the Matrix network /tmp/lab"
url: https://www.tmplab.org/2020/04/01/how-to-install-and-run-bots-for-the-matrix-network/
date: "2023-04-18 13:34:24"
---
[Matrix](https://en.wikipedia.org/wiki/Matrix_(protocol)) is a fun and exciting federated protocol that were using more and more at /tmp/lab.
**If you want to join the discussion, head to [our riot channel](https://riot.fuz.re/#/room/#tmplab:matrix.fuz.re) and check it out!**
Riot is a well-known web GUI for the Matrix protocol which could be defined as “a chat interface between IRC and Slack”. Its cooler than IRC to some extend backlogging is easier- and it is free software, not like Slack 🙂 Still, IRC, Slack and Riot have in common a capacity to use bots, and thats what well be drilling today: Matrix bots. Onward, my mechanical steed!
Note: Our privacy-aware assistance might interject here with some well founded critics of the Matrix ecosystem, which is not free enough as of now. Find here [a list of concerns](https://github.com/privacytoolsIO/services/issues/17) as a github issue tracker for more information.
Anyway, which bot to choose? There are [many](https://github.com/matrix-org/go-neb) [available](https://github.com/matrix-org/Matrix-NEB) [bots](https://github.com/leo-lb/fuzisup) for matrix and even [a page dedicated to them](https://matrix.org/bots/) on the projects website. We chose [maubot](https://github.com/maubot/maubot).
![](https://www.tmplab.org/wp-content/uploads/2020/04/maubot.github.png)
The maubot homepage on github
**Why maubot?**
Well, first, its python, which we like. Also, its actually well coded: [Tulir Asokan](https://github.com/tulir) -the author- did an impressive work at providing [his own implementation of the matrix api](https://github.com/tulir/mautrix-python) which he plans to use to provide a number of bridges. It is modular, meaning that you can extend the functionnalities in a clean manner. And that leads us to hackability, writing your own plugins should be easy with maubot, more on that soon hopefuly.
## Deploying Maubot on a server
Though maubot proposes a docker install, we were not fans of that for system administration reasons. So weve made an install script in bash you can find in [this git project](https://git.interhacker.space/alban/maubot-installer).
![](https://www.tmplab.org/wp-content/uploads/2020/04/maubot.installer-1024x542.png)
The maubot installer project
This install script should really simplify your job. Assign in the DNS a subdomain name -say botsinspace.example.com- to your server IP address and the installation should be as simple as
```
git clone https://git.interhacker.space/alban/maubot-installer.git
cd maubot-installer
bash install.sh
```
After indicating your chosen subdomain, you can go for default answers, including the matrix.org homeserver, and should be fine for the rest of this tutorial.
Et voilà ! You should have a maubot instance running with Letsencrypt on https://botsinspace.example.com
## Creating your first bot
Once the maubot instance is up, understanding the maubot concepts will help you configure it.
*Plugins*
Plugins are the bots “brains”. They are python code and configuration files, ran in background by maubot. Ther are stored on the server as mbp files, which are archives using a zip compression.
*Clients*
Clients are the bots “physical presence”. They are in fact user accounts on matrix servers, no more no less.
*Instances*
Instances are associations of a plugin and a client. Once you have an instance, you have a bot!
So lets start creating our first instance!
## **Add a plugin**
The project page [lists a number of plugins](https://github.com/maubot/maubot) based on the maubot framework.
To install a plugin, you have two options.
**Option 1. Use the web interface**
Log in your maubot instance, click on the plugins “⊕” button. A big UPLOAD button (cf. screenshot) shows up, click on it, select a plugin zip file on your disk, and there you go !
![](https://www.tmplab.org/wp-content/uploads/2020/04/maubot-upload.png)
The maubot plugin menu
Easy right?
Well except one thing: where do you get that zip file in the first place? From the github “Get a zip copy of the project” button of a plugin page? Well, nuhuh, nope, that wont work. Maubot will reject that zip file. Why?
The github zip file contains the file “in a directory” called “$projectname-$branch” and maubot expects files to be at the root of the zip archive.
So, the right way to go is:
**٭** Download a zip file from a plugin repository home page
**٭** Extract it locally
**٭** Enter the newly created directory
**٭** Select all its files and sub-directories
**٭** Create a new zip archive with these
**٭** Upload that zip file to maubot.
Or if you will, plugins might available as “mbp” files in the “release” section of their github page. Sadly, theyre not always up to date, so you might be left with a manual job to do.
**Option 2. Use the command line interface**
Well seeing this could be a bit complex and annoying to repeat we came up with a script in the “maubot installer” project, called [plugin-install.sh](https://git.interhacker.space/alban/maubot-installer/raw/branch/master/plugins-install.sh)
You will need to use a config file or edit the variables at the beginning of the script for it to work though.
Once youve done it you just have to
**٭** Run the script
**٭** Select a plugin in the list
**٭** Login (once only) with your maubot user and password
**٭** And the script will call the “mbc” executable provided by maubot.
It is worth mentioning that some plugins might require a few additional dependencies. For example the [trump plugin](https://github.com/jeffcasavant/MaubotTrumpTweet) required to run an install command in the virtualenv of the project:
```
cd /opt/maubot
source bin/activate
pip install Pillow
```
But now, you should have at least one plugin available. Lets head to the next stop.
## **Add a client**
We wont cover here the run-your-own-bot-factory approach, which requires running your own synapse server, in other word running your own matrix instance. So we will create an account on an existing server and retrieve its token used for interacting with the API.
We will use the default web interface [https://riot.im/app](https://riot.im/app) and request a free matrix.org account.
![](https://www.tmplab.org/wp-content/uploads/2020/04/riot.im_.png)
The Riot.im home
You have to pick a username, for example rook\_the\_bot, which will provide a matrix identifier/address such as “@rook\_the\_bot:matrix.org” after creation.
![](https://www.tmplab.org/wp-content/uploads/2020/04/riot.im_.create.png)
The riot account creation interface
One your mail is validated, log in the web interface and head to the settings page to retrieve the token.
![](https://www.tmplab.org/wp-content/uploads/2020/04/riot.im_.gui_.png)
A Riot settings menu link
You will find it token at the end of the “Help & About” page: click on the <click to reveal> link, and copy the string that appears.
![](https://www.tmplab.org/wp-content/uploads/2020/04/riot.im_.token_-1024x759.png)
Riot token finally shows up!
Time to head back to your maubot instance, and click on the Client “⊕” button. Fill the requested informations : the username you created and the access token are mandatory. Validate.
![](https://www.tmplab.org/wp-content/uploads/2020/04/maubot.client.png)
The maubot client menu
And thats it. Youre ready for the last stage.
## **Add an instance**
Head your maubot instance and client on the Instances “⊕” button.
![](https://www.tmplab.org/wp-content/uploads/2020/04/maubot_gui.png)
The maubot instance menu
Just pick a client and a plugin before validating.
And now you should have your first bot ready! Congratulations!
## How to use your bot
Now if everything went well, you should be able to invite your bot in a room, using the matrix handle you created earlier, as in our example rook\_the\_bot@matrix.org.
Lets say you created an “Instance” associating the [dice](https://github.com/maubot/dice) “Plugin” to the rook\_the\_bot “Client” .
Once you invited rook\_the\_bot to your channel, simply type a `!dice` command. Your bot should after a while reply to you.
Each plugin has its own commands, and you can attach multiple plugins to a single client. But all commands use the front `!` mark.
**Thats it, have fun. And for questions or anything else… see you on matrix!**
@@ -0,0 +1,266 @@
---
page-title: "How to setup your OTP appliance with privacyIDEA"
url: https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/
date: "2023-04-27 20:56:48"
---
### On this page
1. [Base installation](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#base-installation)
2. [Install privacyIDEA](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#install-privacyidea)
3. [Configure your appliance](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#configure-your-appliance)
1. [Create your token administrator](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#create-your-token-administrator)
2. [Create the MySQL database](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#create-the-mysql-database)
3. [Create your RADIUS clients](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#create-your-radius-clients)
4. [Done configuring](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#done-configuring)
4. [Enroll your Token](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#enroll-your-token)
1. [Connect to user source](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#connect-to-user-source)
2. [Enroll a token to the user](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#enroll-a-token-to-the-user)
5. [Test your system](https://www.howtoforge.com/how-to-setup-otp-appliance-with-privacyidea/#test-your-system)
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/server.png?ezimgfmt=rs:180x550/rscb5/ngcb5/notWebP)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/server.png)
*by Nemo @ pixabay*
In this howto we will setup a system that can act as your own personal OTP appliance, managing all authentication devices in your network. You then may configure your services to authenticate against this machine. It is a good idea to use some virtualization mechanism. If you have some old hardware around, this is even as good.
We will install [privacyIDEA](http://privacyidea.org/) on an Ubuntu 14.04 LTS system, which you may have seen earlier [here](https://www.howtoforge.com/how-to-run-privacyidea-with-apache2-and-mysql-on-ubuntu-14.04-lts) or [here](https://www.howtoforge.com/two-factor-authentication-with-otp-using-privacyidea-and-freeradius-on-centos). But this time we will do it even smoother and more elegant!
## Base installation
**Disclaimer:** I assume you are user root in this scenario. If not, you should add "sudo" in front of every command.
So first we install a [plain ubuntu server 14.04 LTS](http://releases.ubuntu.com/14.04/ubuntu-14.04.1-server-amd64.iso) with nothing on it. Please do not install any database or webserver. You should only select openssh to run as a service on this machine.
## Install privacyIDEA
privacyIDEA 1.3.3 comes with a bunch of new debian packages in a launchpad repository, which makes it eaven easier to setup.
First we need to add the repository to the system:
apt-get install software-properties-common
add-apt-repository ppa:privacyidea/privacyidea
apt-get update
Now that we added the privacyidea repository, you can take a look, what is available:
root@ubuntu:~# apt-cache search privacyidea
privacyidea - two-factor authentication system e.g. for OTP devices
privacyideaadm - admin client for privacyIDEA
privacyidea-radius - FreeRADIUS module for privacyIDEA, OTP authentication
privacyidea-all - two-factor authenticaion system. This is a metapackage to install everything.
privacyidea-otrs - OTRS module for privacyIDEA, OTP authentication
privacyidea-nginx - two-factor authentication system. This is a meta package to install privacyidea with nginx
privacyidea-appliance - two-factor authentication system. This is a setup tool for easy system setup.
There are different (meta)-packages for different scenarios. As mentioned, we would like to install a kind of "appliance". So lets do it:
apt-get install privacyidea-appliance privacyidea-radius
This will install the Nginx webserver, MySQL database, the FreeRADIUS server and privacyIDEA with all the python dependencies.
You will be asked to enter a MySQL root password. Choose a good one - we do not need it later! ;-)
After the installation you are ready to configure your appliance.
## Configure your appliance
There is a tool to configure all necessary means of your appliance. Start it at the command line as user root.
privacyidea-setup-tui
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/startscreen.png?ezimgfmt=rs:300x414/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/startscreen.png)
This is a dialog based text UI tool, that lets you perform all relevant tasks on the operating system level like managing your token administrators, setting log levels, regenerating encryption and signing keys, set the right webservice and RADIUS sevice and managing your RADIUS clients.
At least we need to perform the following tasks:
- create at least one token administrator
- create the MySQL database
- create a RADIUS client
Go through the tool to get familiar, what can be done.
The tool is based on parser logic for the FreeRADIUS client files, privacyIDEA ini files and the nginx file. So you can also edit the files at the command line, the changes will be preserved.
**Note:** The setup tool will not preserve any comments in the files, if you edit those files manually!
### Create your token administrator
To manage your token administrators go to *privacyidea* ? *manage admins*.
There you can choose *Add new admin*.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/add-new-admin.png?ezimgfmt=rs:300x278/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/add-new-admin.png)
You will be asked for:
- A username, where I choose *admin* and
- the password (twice!) which is not echoed on the screen.
After that, you will see the new token admin in the list. You can repeat this step as often as you wish to. You can delete an administrator or change the password, by choose the administrator from the list.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/admin-list.png?ezimgfmt=rs:300x278/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/admin-list.png)
Now you created your admin (or admins) you can hit cancel and cancel and return to the main menu.
### Create the MySQL database
You also might skipt this step. privacyIDEA would then run with the SQLite database at /var/lib/privacyidea/. But we choose to use a MySQL database in this scenario.
So go to *privacyIDEA* ? *database*...
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/db1.png?ezimgfmt=rs:400x331/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/db1.png)
There you can choose *reset locally*, which will create the MySQL database, create a user and setup the database tables.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/db2.png?ezimgfmt=rs:300x282/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/db2.png)
Yes, we do!
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/db3.png?ezimgfmt=rs:400x342/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/db3.png)
Finally you see the new configuration, using the MySQL database.
### Create your RADIUS clients
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/clientconfig1.png?ezimgfmt=rs:300x272/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/clientconfig1.png)
In the main menu choose *FreeRADIUS* ? *client config* to manage your RADIUS clients. The default /etc/freeradius/clients.conf comes with a localhost client, this is why you already see one client in the list.
**Note:** You can not delete the last client, so we create new clients!
We will create a client network to cope with all possible clients in your network and the client localhost, to run tests against the system. So I choose these values - you should adapt the network accordingly:
1. mynetwork
name: mynetwork
ip: 172.16.200.0
netmask: 24
secret: topSecret4All
shortname: *empty*
2. localhost
name: localhost
ip: 127.0.0.1
netmask: 32
secret: topSecretOnce
shortname: *empty*
We choose *Add new client* to create the new client "mynetwork" and the dialogs will ask us for the above values. Thus all clients on the network 172.16.200.0/24 will be able to issue a RADIUS request with the RADIUS secret "topSecret4All".
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/newclient1.png?ezimgfmt=rs:300x192/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/newclient1.png)
*The name of the client configuration*
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/newclient2.png?ezimgfmt=rs:300x194/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/newclient2.png)
*The IP address*
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/newclient3.png?ezimgfmt=rs:300x193/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/newclient3.png)
*The netmask*
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/newclient4.png?ezimgfmt=rs:300x194/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/newclient4.png)
*The shared secret*
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/newclient5.png?ezimgfmt=rs:300x194/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/newclient5.png)
*The shortname can be left blank*
You can select the client "localhost" and delete it. After that you can create a new client "localhost" according to the above settings.
### Done configuring
Now you are done configuring the base system. The setup tool should realize, that you change important data and restart the services. But just to be sure you can do this manually:
service uwsgi restart
service freeradius restart
## Enroll your Token
You can now enroll your authentication devices, which is done using the management Web UI. Point your browser to https://your-server, accept the certificate warning of the self signed certificate and you will get the login screen:
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/login-screen.png?ezimgfmt=rs:500x264/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/login-screen.png)
On this login screen you can login as a token administrator. All the token administrator you created need to add "@admin" to their name, to indicate, that they are administrators.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/webui1.png?ezimgfmt=rs:500x344/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/webui1.png)
The web UI gives you a view of tokens, users, policies, machines and the audit log.
### Connect to user source
As privacyIDEA does not manage users itself we need to read users from some source. We will use the /etc/passwd file.
Click on *privacyIDEA config* ? *useridresolvers*, click the button *New* and select *Flatfile*.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/flatfile.png?ezimgfmt=rs:500x193/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/flatfile.png)
Click *save* to save the resolver definition with the name "local".
**Note:** At any point you may click the white question mark in the green circle which will take you to the context online help in another browser window. In fact it might be a good idea to read something about resolvers and realms ;-).
When you close the resolver window you will be either taken automatically to the realm window or you can click *privacyIDEA Config* ? *realms* to create a new realm. In this dialog you need to click *New*.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/realms1.png?ezimgfmt=rs:500x463/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/realms1.png)
Enter the name of the realm ("realm1") and select the resolver ("local") and click *Save*.
Then you will see the new realm in your realm list.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/realms2.png?ezimgfmt=rs:500x458/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/realms2.png)
You may close the window and click the tab *User View*.
### Enroll a token to the user
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/userview.png?ezimgfmt=rs:500x327/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/userview.png)
At the bottom you can search for a user by entering "r\*" and clicking the *search* button. You will see the user root. Select the user by clicking on it. The user will be mentioned in the left sidebar as selected user. Now you can click the button *enroll* in the left sidebar.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/sidebar.png?ezimgfmt=rs:200x175/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/sidebar.png)
Then the enrollment dialog will open. Choose the "HMAC eventbased" token type and select *generate HMAC key*.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/enroll.png?ezimgfmt=rs:400x328/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/enroll.png)
Click the button *Enroll*. The server will create a secret key and render a QR code that can be scanned with the Google Authenticator App. This Google Authenticator app will now work as an authentication device.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/qr.png?ezimgfmt=rs:400x389/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/qr.png)
After you have scanned the QR code you can click *OK* and finally set a PIN - a password that only you know - for this very token.
[![](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/pin.png?ezimgfmt=rs:400x306/rscb5/ng:webp/ngcb5)](https://www.howtoforge.com/images/otp-appliance-with-privacyidea/big/pin.png)
Now you have two factors to authenticate with - the PIN and the OTP value generated by your authentication device.
## Test your system
Now we can check the system by issuing a RADIUS request to this appliance. I will do it from the system itself being logged in as root via ssh with a command like:
echo "User-Name=root, Password=PIN+OTP" | radclient -s 127.0.0.1 auth topSecretOnce
The *Password* being concatenated from the PIN and the OTP value and "topSecretOnce" being the shared secret for the localhost.
root@ubuntu:~# echo "User-Name=root, Password=test570391" | radclient -s 127.0.0.1 auth topSecretOnce
Received response ID 209, code 3, length = 55
Reply-Message = "privacyIDEA server denied access!"
Total approved auths: 0
Total denied auths: 1
Total lost auths: 0
root@ubuntu:~# echo "User-Name=root, Password=test137634" | radclient -s 127.0.0.1 auth topSecretOnce
Received response ID 180, code 2, length = 48
Reply-Message = "privacyIDEA access granted"
Total approved auths: 1
Total denied auths: 0
Total lost auths: 0
**Note:** Due to a different starting counter in the App and in the server the first authentication will fail.
Now you can take all your RADIUS enabled applications (Firewall, OpenVPN) and configure it to authenticate against privacyIDEA using the previously defined shared secret.
Happy authenticating!
@@ -0,0 +1,193 @@
---
page-title: "Install and Run on AMD GPUs · AUTOMATIC1111/stable-diffusion-webui Wiki"
url: https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs
date: "2023-04-23 18:19:53"
---
> python -m venv venv
---
## Windows
Windows+AMD support has **not** officially been made for webui,
but you can install lshqqytiger's fork of webui that uses **Direct-ml**.
\-Training currently doesn't work, yet a variety of features/extensions do, such as LoRAs and controlnet. Report issues at [https://github.com/lshqqytiger/stable-diffusion-webui-directml/issues](https://github.com/lshqqytiger/stable-diffusion-webui-directml/issues)
1. Install [Python 3.10.6](https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe) (ticking **Add to PATH**), and [git](https://github.com/git-for-windows/git/releases/download/v2.39.2.windows.1/Git-2.39.2-64-bit.exe)
2. paste this line in cmd/terminal: `git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml && cd stable-diffusion-webui-directml && git submodule init && git submodule update`
(you can move the program folder somewhere else.)
3. Double-click webui-user.bat
4. If it looks like it is stuck when installing or running, press enter in the terminal and it should continue.
If you have 4-6gb vram, try adding these flags to \`webui-user.bat\` like so:
- `COMMANDLINE_ARGS=--opt-sub-quad-attention --lowvram --disable-nan-check`
- You can add --autolaunch to auto open the url for you.
(The rest **below are installation guides for linux** with rocm.)
## Automatic Installation
(As of [1/15/23](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/6709) you can just run webui-user.sh and pytorch+rocm should be automatically installed for you.)
1. Install Python 3.10.6
2. git clone [https://github.com/AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui)
3. Place stable diffusion checkpoint (model.ckpt) in the models/Stable-diffusion directory
4. For many AMD gpus you MUST Add `--precision full` `--no-half` to `COMMANDLINE_ARGS=` in **webui-user.sh** to avoid black squares or crashing.\*
5. Run **webui.sh**
\*Certain cards like the Radeon RX 6000 Series and the RX 500 Series will function normally without the option `--precision full --no-half`, saving plenty of vram. (noted [here](https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/5468).)
## Running natively
Execute the following:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip wheel
# It's possible that you don't need "--precision full", dropping "--no-half" however crashes my drivers
TORCH\_COMMAND='pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.1.1' python launch.py --precision full --no-half
In following runs you will only need to execute:
cd stable-diffusion-webui
# Optional: "git pull" to update the repository
source venv/bin/activate
# It's possible that you don't need "--precision full", dropping "--no-half" however crashes my drivers
TORCH\_COMMAND='pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.1.1' python launch.py --precision full --no-half
The first generation after starting the WebUI might take very long, and you might see a message similar to this:
> MIOpen(HIP): Warning \[SQLiteBase\] Missing system database file: gfx1030\_40.kdb Performance may degrade. Please follow instructions to install: [https://github.com/ROCmSoftwarePlatform/MIOpen#installing-miopen-kernels-package](https://github.com/ROCmSoftwarePlatform/MIOpen#installing-miopen-kernels-package)
The next generations should work with regular performance. You can follow the link in the message, and if you happen to use the same operating system, follow the steps there to fix this issue. If there is no clear way to compile or install the MIOpen kernels for your operating system, consider following the "Running inside Docker"-guide below.
## Running inside Docker
Pull the latest `rocm/pytorch` Docker image, start the image and attach to the container (taken from the `rocm/pytorch` documentation): `docker run -it --network=host --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $HOME/dockerx:/dockerx rocm/pytorch`
Execute the following inside the container:
cd /dockerx
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip wheel
# It's possible that you don't need "--precision full", dropping "--no-half" however crashes my drivers
TORCH\_COMMAND='pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.1.1' REQS\_FILE='requirements.txt' python launch.py --precision full --no-half
Following runs will only require you to restart the container, attach to it again and execute the following inside the container: Find the container name from this listing: `docker container ls --all`, select the one matching the `rocm/pytorch` image, restart it: `docker container restart <container-id>` then attach to it: `docker exec -it <container-id> bash`.
cd /dockerx/stable-diffusion-webui
# Optional: "git pull" to update the repository
source venv/bin/activate
# It's possible that you don't need "--precision full", dropping "--no-half" however crashes my drivers
TORCH\_COMMAND='pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.1.1' REQS\_FILE='requirements.txt' python launch.py --precision full --no-half
The `/dockerx` folder inside the container should be accessible in your home directory under the same name.
## Updating Python version inside Docker
If the web UI becomes incompatible with the pre-installed Python 3.7 version inside the Docker image, here are instructions on how to update it (assuming you have successfully followed "Running inside Docker"):
Execute the following inside the container:
apt install python3.9-full # Confirm every prompt
update-alternatives --install /usr/local/bin/python python /usr/bin/python3.9 1
echo 'PATH=/usr/local/bin:$PATH' \>> ~/.bashrc
Then restart the container and attach again. If you check `python --version` it should now say `Python 3.9.5` or newer.
Run `rm -rf /dockerx/stable-diffusion-webui/venv` inside the container and then follow the steps in "Running inside Docker" again, skipping the `git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui` and using the modified launch-command below instead:
TORCH\_COMMAND='pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.1.1' python launch.py --precision full --no-half
It's possible that you don't need "--precision full", dropping "--no-half" however it may not work for everyone. Certain cards like the Radeon RX 6000 Series and the RX 500 Series will function normally without the option `--precision full --no-half`, saving plenty of vram. (noted [here](https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/5468).)
Always use this new launch-command from now on, also when restarting the web UI in following runs.
## Install on AMD and Arch Linux
**Install webui on Arch Linux with Arch-specific packages**
*and possibly other Arch-based Linux distributions (tested Feb 22 2023)*
## Arch-specific dependencies
1. Start with [required dependencies](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Dependencies#required-dependencies) and install `pip`
sudo pacman -S python-pip
2. Install `pytorch` with ROCm backend
Arch \[Community\] repository offers two `pytorch` packages, `python-pytorch-rocm` and `python-pytorch-opt-rocm`. For CPUs with AVX2 instruction set support, that is, CPU microarchitectures beyond Haswell (Intel, 2013) or Excavator (AMD, 2015), install `python-pytorch-opt-rocm` to benefit from performance optimizations. Otherwise install `python-pytorch-rocm`:
# Install either one:
sudo pacman -S python-pytorch-rocm
sudo pacman -S python-pytorch-opt-rocm # AVX2 CPUs only
3. Install `torchvision` with ROCm backend
`python-torchvision-rocm` package is located in AUR. Clone the git repository and compile the package on your machine
git clone https://aur.archlinux.org/python-torchvision-rocm.git
cd python-torchvision-rocm
makepkg -si
Confirm all steps until Pacman finishes installing `python-torchvision-rocm`.
Alternatively, install the `python-torchvision-rocm` package with a [AUR helper](https://wiki.archlinux.org/title/AUR_helpers).
## Setup `venv` environment
1. Manually create a `venv` environment with system site-packages (this will allows access to system `pytorch` and `torchvision`). Install the remaining Python dependencies
python -m venv venv --system-site-packages
source venv/bin/activate
pip install -r requirements.txt
2. Create webui launch script
The Python launcher for webui needs to be run directly. In the project folder, create a new file called `webui-py.sh` and paste the following code:
#!/bin/bash
python launch.py #add arguments here
Depending on the GPU model, you may need to add certain [Command Line Arguments](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Command-Line-Arguments-and-Settings) and [Optimizations](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Optimizations) for webui to run properly. Also refer to the [Automatic Installation](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs#automatic-installation) section for AMD GPUs.
3. Make the script executable and run webui (first start may take a bit longer)
sudo chmod +x ./webui-py.sh
./webui-py.sh
## Launch
Run the following inside the project root to start webui:
source venv/bin/activate
./webui-py.sh
## Limitations
- GPU model has to be supported by Arch dependencies
See if your GPU is listed as a build architecture in `PYTORCH_ROCM_ARCH` variable for [Tourchvision](https://github.com/rocm-arch/python-torchvision-rocm/blob/b66f7ed9540a0e25f4a81bf0d9cfc3d76bc0270e/PKGBUILD#L68-L74) and [PyTorch](https://github.com/archlinux/svntogit-community/blob/5689e7f44f082ba3c37724c2890e93e7106002a1/trunk/PKGBUILD#L220). References for architectures can be found [here](https://llvm.org/docs/AMDGPUUsage.html#processors). If not, consider building both packages locally or use another [installation method](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs).
- Arch dependencies (`pytorch`, `torchvision`) are kept up-to-date by full system updates (`pacman -Syu`) and compiling, which may not be desirable when dependency combinations with fixed versions are wished
*This guide has been tested on AMD Radeon RX6800 with Python 3.10.9, ROCm 5.4.3, PyTorch 1.13.1, Torchvision 0.14.1*
@@ -0,0 +1,190 @@
---
page-title: "Installation - Docs - Appwrite"
url: https://appwrite.io/docs/installation
date: "2023-04-06 23:41:10"
---
##   Table of contents
- [Home](https://appwrite.io/docs)
**Getting Started**
- [Installation](https://appwrite.io/docs/installation)
-    [Production](https://appwrite.io/docs/production)
-    [Env. Variables](https://appwrite.io/docs/environment-variables)
-    [Email Delivery](https://appwrite.io/docs/email-delivery)
-    [SMS Delivery](https://appwrite.io/docs/sms-delivery)
-    [Certificates](https://appwrite.io/docs/certificates)
-    [Debugging](https://appwrite.io/docs/debugging)
-    [Upgrade](https://appwrite.io/docs/upgrade)
- [Appwrite for Web](https://appwrite.io/docs/getting-started-for-web)
- [Appwrite for Flutter](https://appwrite.io/docs/getting-started-for-flutter)
- [Appwrite for Apple](https://appwrite.io/docs/getting-started-for-apple)
- [Appwrite for Android](https://appwrite.io/docs/getting-started-for-android)
- [Appwrite for Server](https://appwrite.io/docs/getting-started-for-server)
- [Appwrite CLI](https://appwrite.io/docs/command-line)
-   [Deployment](https://appwrite.io/docs/command-line-deployment)
-   [Commands](https://appwrite.io/docs/command-line-commands)
-   [CI Mode](https://appwrite.io/docs/command-line-ci)
- [SDKs](https://appwrite.io/docs/sdks)
**APIs**
- [REST](https://appwrite.io/docs/rest)
- [GraphQL](https://appwrite.io/docs/graphql)
- [Realtime](https://appwrite.io/docs/realtime)
**References**
- [Account](https://appwrite.io/docs/client/account)
- [Users](https://appwrite.io/docs/server/users)
- [Teams](https://appwrite.io/docs/client/teams)
- [Databases](https://appwrite.io/docs/client/databases)
- [Storage](https://appwrite.io/docs/client/storage)
- [Functions](https://appwrite.io/docs/client/functions)
- [Localization](https://appwrite.io/docs/client/locale)
- [Avatars](https://appwrite.io/docs/client/avatars)
- [Health](https://appwrite.io/docs/server/health)
**Guides**
- [Databases](https://appwrite.io/docs/databases)
- [Storage](https://appwrite.io/docs/storage)
- [Authentication](https://appwrite.io/docs/authentication)
- [Functions](https://appwrite.io/docs/functions)
**Advanced**
- [API Keys](https://appwrite.io/docs/keys)
- [Permissions](https://appwrite.io/docs/permissions)
- [Events](https://appwrite.io/docs/events)
- [Pagination](https://appwrite.io/docs/pagination)
- [Webhooks](https://appwrite.io/docs/webhooks)
- [Custom Domains](https://appwrite.io/docs/custom-domains)
- [Response Codes](https://appwrite.io/docs/response-codes)
- [Rate Limits](https://appwrite.io/docs/rate-limits)
[Docs](https://appwrite.io/docs)
## Installation
Appwrite is a self-hosted backend server, packaged as a set of Docker containers. You can install and run Appwrite on any operating system that can run a [Docker CLI](https://www.docker.com/products/docker-desktop). You can use Appwrite on your local machine or a cloud provider of your choice.
## [System Requirements](https://appwrite.io/docs/installation#systemRequirements)
Appwrite is designed to run well on both small and large deployments. The minimum requirements to run Appwrite are as little as **1 CPU core** and **2GB of RAM**, and an operating system that supports Docker.
Appwrite requires [Docker Compose Version 2](https://docs.docker.com/compose/install/). To install Appwrite, make sure your Docker installation is updated to support Composer V2.
### Upgrading From Older Versions
If you are migrating from an older version of Appwrite, you need to follow the [migration instructions](https://appwrite.io/docs/upgrade).
## [Install with Docker](https://appwrite.io/docs/installation#installWithDocker)
The easiest way to start running your Appwrite server is by running our Docker installer tool from your terminal. Before running the installation command, make sure you have [Docker CLI](https://www.docker.com/products/docker-desktop) installed on your host machine.
You will be prompted to configure the following during the setup command:
1. Your Appwrite instance's HTTP and HTTPs ports.
2. Your Appwrite instance's secret key which used to encrypt sensitive data.
3. Your Appwrite instance's main hostname. Appwrite will generate a certificate using this hostname.
4. Your Appwrite instance's DNS A record hostname. Typically set to the same value as your Appwrite instance's hostname.
### [Unix](https://appwrite.io/docs/installation#unix)
```
docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.2.1
```
*Click Here to Copy*
### [Windows](https://appwrite.io/docs/installation#windows)
Hyper-V and Containers Windows features must be enabled to run Appwrite on Windows with Docker. If you don't have these features available, you can install [Docker Desktop](https://docs.docker.com/desktop/windows/install/) which uses Virtualbox to run Appwrite on a Virtual Machine.
- CMD
- PowerShell
- #### CMD
```
docker run -it --rm ^
--volume //var/run/docker.sock:/var/run/docker.sock ^
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
--entrypoint="install" ^
appwrite/appwrite:1.2.1
```
*Click Here to Copy*
- #### PowerShell
```
docker run -it --rm `
--volume /var/run/docker.sock:/var/run/docker.sock `
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
--entrypoint="install" `
appwrite/appwrite:1.2.1
```
*Click Here to Copy*
## [One-Click Setups](https://appwrite.io/docs/installation#one-click-setups)
In addition to running Appwrite locally, you can also launch Appwrite using a pre-configured setup. This allows you to get up and running with Appwrite quickly without installing Docker on your local machine.
Choose from one of the providers below:
Provider
![Logo](https://appwrite.io/images-ee/one-click/digitalocean.svg) ![Logo](https://appwrite.io/images-ee/one-click/dark/digitalocean.svg)
DigitalOcean
[Click to Install](https://marketplace.digitalocean.com/apps/appwrite)
![Logo](https://appwrite.io/images-ee/one-click/gitpod.svg) ![Logo](https://appwrite.io/images-ee/one-click/dark/gitpod.svg)
Gitpod
[Click to Install](https://gitpod.io/#https://github.com/appwrite/integration-for-gitpod)
### [Manual (using docker-compose.yml)](https://appwrite.io/docs/installation#manual)
For advanced Docker users, the manual installation might seem more familiar. To set up Appwrite manually, download the Appwrite base [docker-compose.yml](https://appwrite.io/install/compose) and [.env](https://appwrite.io/install/env) files, then move them inside a directory named `appwrite`. After the download completes, update the different environment variables as you wish in the `.env` file and start the Appwrite stack using the following Docker command:
```
docker compose up -d --remove-orphans
```
*Click Here to Copy*
Once the Docker installation completes, go to your machine's hostname or IP address on your browser to access the Appwrite console. Please note that on hosts that are not Linux-native, the server might take a few minutes to start after installation completes.
### [Stop](https://appwrite.io/docs/installation#stop)
You can stop your Appwrite containers by using the following command executed from the same directory as your `docker-compose.yml` file.
```
docker compose stop
```
*Click Here to Copy*
### [Uninstall](https://appwrite.io/docs/installation#uninstall)
To stop and remove your Appwrite containers, you can use the following command executed from the same directory as your `docker-compose.yml` file.
```
docker compose down -v
```
*Click Here to Copy*
## [Learn More](https://appwrite.io/docs/installation#learnMore)
@@ -0,0 +1,29 @@
---
page-title: "Introduction | Hasura Backend Plus"
url: https://nhost.github.io/hasura-backend-plus/docs/intro
date: "2023-04-23 12:41:26"
---
## Introduction
Hasura Backend Plus handles **authentication** and **storage** for [Hasura](https://github.com/hasura/graphql-engine).
Hasura Backend Plus runs in a separate Docker container along side Postgres and Hasura.
## Authentication[#](https://nhost.github.io/hasura-backend-plus/docs/intro#authentication "Direct link to heading")
- Users and accounts are saved in the database.
- JWT tokens and refresh tokens are automatically generated and managed.
- Add custom user claims to the JWT token based on user data.
- Hasura roles managed.
- Two-factor authentication support.
- Third-party OAuth providers such as GitHub, Google, Facebook, Twitter etc.
- Magic Link support.
- Built in transactional emails such as account activation and password reset.
- Rate limiting.
- Optional checking for [Pwned Passwords](https://haveibeenpwned.com/Passwords).
## Storage[#](https://nhost.github.io/hasura-backend-plus/docs/intro#storage "Direct link to heading")
- Backed by S3 (Minio).
- Rules engine for file access permissions.
- Out of the box image transformation.
@@ -0,0 +1,156 @@
---
page-title: "Introduction - Learning Rust With Entirely Too Many Linked Lists"
url: https://rust-unofficial.github.io/too-many-lists/
date: "2023-04-02 09:32:04"
---
## [Learn Rust With Entirely Too Many Linked Lists](https://rust-unofficial.github.io/too-many-lists/#learn-rust-with-entirely-too-many-linked-lists)
> Got any issues or want to check out all the final code at once? [Everything's on Github!](https://github.com/rust-unofficial/too-many-lists)
> **NOTE**: The current edition of this book is written against Rust 2018, which was first released with rustc 1.31 (Dec 8, 2018). If your rust toolchain is new enough, the Cargo.toml file that `cargo new` creates should contain the line `edition = "2018"` (or if you're reading this in the far future, perhaps some even larger number!). Using an older toolchain is possible, but unlocks a secret **hardmode**, where you get extra compiler errors that go completely unmentioned in the text of this book. Wow, sounds like fun!
I fairly frequently get asked how to implement a linked list in Rust. The answer honestly depends on what your requirements are, and it's obviously not super easy to answer the question on the spot. As such I've decided to write this book to comprehensively answer the question once and for all.
In this series I will teach you basic and advanced Rust programming entirely by having you implement 6 linked lists. In doing so, you should learn:
- The following pointer types: `&`, `&mut`, `Box`, `Rc`, `Arc`, `*const`, `*mut`, `NonNull`(?)
- Ownership, borrowing, inherited mutability, interior mutability, Copy
- All The Keywords: struct, enum, fn, pub, impl, use, ...
- Pattern matching, generics, destructors
- Testing, installing new toolchains, using `miri`
- Unsafe Rust: raw pointers, aliasing, stacked borrows, UnsafeCell, variance
Yes, linked lists are so truly awful that you deal with all of these concepts in making them real.
Everything's in the sidebar (may be collapsed on mobile), but for quick reference, here's what we're going to be making:
1. [A Bad Singly-Linked Stack](https://rust-unofficial.github.io/too-many-lists/first.html)
2. [An Ok Singly-Linked Stack](https://rust-unofficial.github.io/too-many-lists/second.html)
3. [A Persistent Singly-Linked Stack](https://rust-unofficial.github.io/too-many-lists/third.html)
4. [A Bad But Safe Doubly-Linked Deque](https://rust-unofficial.github.io/too-many-lists/fourth.html)
5. [An Unsafe Singly-Linked Queue](https://rust-unofficial.github.io/too-many-lists/fifth.html)
6. [TODO: An Ok Unsafe Doubly-Linked Deque](https://rust-unofficial.github.io/too-many-lists/sixth.html)
7. [Bonus: A Bunch of Silly Lists](https://rust-unofficial.github.io/too-many-lists/infinity.html)
Just so we're all the same page, I'll be writing out all the commands that I feed into my terminal. I'll also be using Rust's standard package manager, Cargo, to develop the project. Cargo isn't necessary to write a Rust program, but it's *so much* better than using rustc directly. If you just want to futz around you can also run some simple programs in the browser via [play.rust-lang.org](https://play.rust-lang.org/).
In later sections, we'll be using "rustup" to install extra Rust tooling. I strongly recommend [installing all of your Rust toolchains using rustup](https://www.rust-lang.org/tools/install).
Let's get started and make our project:
```
> cargo new --lib lists
> cd lists
```
We'll put each list in a separate file so that we don't lose any of our work.
It should be noted that the *authentic* Rust learning experience involves writing code, having the compiler scream at you, and trying to figure out what the heck that means. I will be carefully ensuring that this occurs as frequently as possible. Learning to read and understand Rust's generally excellent compiler errors and documentation is *incredibly* important to being a productive Rust programmer.
Although actually that's a lie. In writing this I encountered *way* more compiler errors than I show. In particular, in the later chapters I won't be showing a lot of the random "I typed (copy-pasted) bad" errors that you expect to encounter in every language. This is a *guided tour* of having the compiler scream at us.
We're going to be going pretty slow, and I'm honestly not going to be very serious pretty much the entire time. I think programming should be fun, dang it! If you're the type of person who wants maximally information-dense, serious, and formal content, this book is not for you. Nothing I will ever make is for you. You are wrong.
## [An Obligatory Public Service Announcement](https://rust-unofficial.github.io/too-many-lists/#an-obligatory-public-service-announcement)
Just so we're totally 100% clear: I hate linked lists. With a passion. Linked lists are terrible data structures. Now of course there's several great use cases for a linked list:
- You want to do *a lot* of splitting or merging of big lists. *A lot*.
- You're doing some awesome lock-free concurrent thing.
- You're writing a kernel/embedded thing and want to use an intrusive list.
- You're using a pure functional language and the limited semantics and absence of mutation makes linked lists easier to work with.
- ... and more!
But all of these cases are *super rare* for anyone writing a Rust program. 99% of the time you should just use a Vec (array stack), and 99% of the other 1% of the time you should be using a VecDeque (array deque). These are blatantly superior data structures for most workloads due to less frequent allocation, lower memory overhead, true random access, and cache locality.
Linked lists are as *niche* and *vague* of a data structure as a trie. Few would balk at me claiming a trie is a niche structure that your average programmer could happily never learn in an entire productive career -- and yet linked lists have some bizarre celebrity status. We teach every undergrad how to write a linked list. It's the only niche collection [I couldn't kill from std::collections](https://doc.rust-lang.org/std/collections/struct.LinkedList.html). It's [*the* list in C++](http://en.cppreference.com/w/cpp/container/list)!
We should all as a community say *no* to linked lists as a "standard" data structure. It's a fine data structure with several great use cases, but those use cases are *exceptional*, not common.
Several people apparently read the first paragraph of this PSA and then stop reading. Like, literally they'll try to rebut my argument by listing one of the things in my list of *great use cases*. The thing right after the first paragraph!
Just so I can link directly to a detailed argument, here are several attempts at counter-arguments I have seen, and my response to them. Feel free to skip to [the first chapter](https://rust-unofficial.github.io/too-many-lists/first.html) if you just want to learn some Rust!
## [Performance doesn't always matter](https://rust-unofficial.github.io/too-many-lists/#performance-doesnt-always-matter)
Yes! Maybe your application is I/O-bound or the code in question is in some cold case that just doesn't matter. But this isn't even an argument for using a linked list. This is an argument for using *whatever at all*. Why settle for a linked list? Use a linked hash map!
If performance doesn't matter, then it's *surely* fine to apply the natural default of an array.
## [They have O(1) split-append-insert-remove if you have a pointer there](https://rust-unofficial.github.io/too-many-lists/#they-have-o1-split-append-insert-remove-if-you-have-a-pointer-there)
Yep! Although as [Bjarne Stroustrup notes](https://www.youtube.com/watch?v=YQs6IC-vgmo) *this doesn't actually matter* if the time it takes to get that pointer completely dwarfs the time it would take to just copy over all the elements in an array (which is really quite fast).
Unless you have a workload that is heavily dominated by splitting and merging costs, the penalty *every other* operation takes due to caching effects and code complexity will eliminate any theoretical gains.
*But yes, if you're profiling your application to spend a lot of time in splitting and merging, you may have gains in a linked list*.
## [I can't afford amortization](https://rust-unofficial.github.io/too-many-lists/#i-cant-afford-amortization)
You've already entered a pretty niche space -- most can afford amortization. Still, arrays are amortized *in the worst case*. Just because you're using an array, doesn't mean you have amortized costs. If you can predict how many elements you're going to store (or even have an upper-bound), you can pre-reserve all the space you need. In my experience it's *very* common to be able to predict how many elements you'll need. In Rust in particular, all iterators provide a `size_hint` for exactly this case.
Then `push` and `pop` will be truly O(1) operations. And they're going to be *considerably* faster than `push` and `pop` on linked list. You do a pointer offset, write the bytes, and increment an integer. No need to go to any kind of allocator.
How's that for low latency?
*But yes, if you can't predict your load, there are worst-case latency savings to be had!*
## [Linked lists waste less space](https://rust-unofficial.github.io/too-many-lists/#linked-lists-waste-less-space)
Well, this is complicated. A "standard" array resizing strategy is to grow or shrink so that at most half the array is empty. This is indeed a lot of wasted space. Especially in Rust, we don't automatically shrink collections (it's a waste if you're just going to fill it back up again), so the wastage can approach infinity!
But this is a worst-case scenario. In the best-case, an array stack only has three pointers of overhead for the entire array. Basically no overhead.
Linked lists on the other hand unconditionally waste space per element. A singly-linked list wastes one pointer while a doubly-linked list wastes two. Unlike an array, the relative wasteage is proportional to the size of the element. If you have *huge* elements this approaches 0 waste. If you have tiny elements (say, bytes), then this can be as much as 16x memory overhead (8x on 32-bit)!
Actually, it's more like 23x (11x on 32-bit) because padding will be added to the byte to align the whole node's size to a pointer.
This is also assuming the best-case for your allocator: that allocating and deallocating nodes is being done densely and you're not losing memory to fragmentation.
*But yes, if you have huge elements, can't predict your load, and have a decent allocator, there are memory savings to be had!*
## [I use linked lists all the time in <functional language>](https://rust-unofficial.github.io/too-many-lists/#i-use-linked-lists-all-the-time-in-functional-language)
Great! Linked lists are super elegant to use in functional languages because you can manipulate them without any mutation, can describe them recursively, and also work with infinite lists due to the magic of laziness.
Specifically, linked lists are nice because they represent an iteration without the need for any mutable state. The next step is just visiting the next sublist.
Rust mostly does this kind of thing with [iterators](https://doc.rust-lang.org/std/iter/trait.Iterator.html). They can be infinite and you can map, filter, reverse, and concatenate them just like a functional list, and it will all be done just as lazily!
Rust also lets you easily talk about sub-arrays with *[slices](https://doc.rust-lang.org/std/primitive.slice.html)*. Your usual head/tail split in a functional language is [just `slice.split_at_mut(1)`](https://doc.rust-lang.org/std/primitive.slice.html#method.split_at_mut). For a long time, Rust had an experimental system for pattern matching on slices which was super cool, but the feature was simplified when it was stabilized. Still, [basic slice patterns](https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html) are neat! And of course, slices can be turned into iterators!
*But yes, if you're limited to immutable semantics, linked lists can be very nice*.
Note that I'm not saying that functional programming is necessarily weak or bad. However it *is* fundamentally semantically limited: you're largely only allowed to talk about how things *are*, and not how they should be *done*. This is actually a *feature*, because it enables the compiler to do tons of [exotic transformations](https://wiki.haskell.org/GHC_optimisations#Fusion) and potentially figure out the *best* way to do things without you having to worry about it. However this comes at the cost of being *able* to worry about it. There are usually escape hatches, but at some limit you're just writing procedural code again.
Even in functional languages, you should endeavour to use the appropriate data structure for the job when you actually need a data structure. Yes, singly-linked lists are your primary tool for control flow, but they're a really poor way to actually store a bunch of data and query it.
## [Linked lists are great for building concurrent data structures!](https://rust-unofficial.github.io/too-many-lists/#linked-lists-are-great-for-building-concurrent-data-structures)
Yes! Although writing a concurrent data structure is really a whole different beast, and isn't something that should be taken lightly. Certainly not something many people will even *consider* doing. Once one's been written, you're also not really choosing to use a linked list. You're choosing to use an MPSC queue or whatever. The implementation strategy is pretty far removed in this case!
*But yes, linked lists are the defacto heroes of the dark world of lock-free concurrency.*
## [Mumble mumble kernel embedded something something intrusive.](https://rust-unofficial.github.io/too-many-lists/#mumble-mumble-kernel-embedded-something-something-intrusive)
It's niche. You're talking about a situation where you're not even using your language's *runtime*. Is that not a red flag that you're doing something strange?
It's also wildly unsafe.
*But sure. Build your awesome zero-allocation lists on the stack.*
## [Iterators don't get invalidated by unrelated insertions/removals](https://rust-unofficial.github.io/too-many-lists/#iterators-dont-get-invalidated-by-unrelated-insertionsremovals)
That's a delicate dance you're playing. Especially if you don't have a garbage collector. I might argue that your control flow and ownership patterns are probably a bit too tangled, depending on the details.
*But yes, you can do some really cool crazy stuff with cursors.*
## [They're simple and great for teaching!](https://rust-unofficial.github.io/too-many-lists/#theyre-simple-and-great-for-teaching)
Well, yeah. You're reading a book dedicated to that premise. Well, singly-linked lists are pretty simple. Doubly-linked lists can get kinda gnarly, as we'll see.
## [Take a Breath](https://rust-unofficial.github.io/too-many-lists/#take-a-breath)
Ok. That's out of the way. Let's write a bajillion linked lists.
[On to the first chapter!](https://rust-unofficial.github.io/too-many-lists/first.html)
@@ -0,0 +1,46 @@
---
page-title: "Introduction - Rust and WebAssembly"
url: https://rustwasm.github.io/docs/book/
date: "2023-04-02 09:33:54"
---
[
## Rust 🦀 and WebAssembly 🕸
](https://rustwasm.github.io/docs/book/#rust--and-webassembly-)
This small book describes how to use [Rust](https://www.rust-lang.org/) and [WebAssembly](https://webassembly.org/) together.
[
## Who is this book for?
](https://rustwasm.github.io/docs/book/#who-is-this-book-for)
This book is for anyone interested in compiling Rust to WebAssembly for fast, reliable code on the Web. You should know some Rust, and be familiar with JavaScript, HTML, and CSS. You don't need to be an expert in any of them.
Don't know Rust yet? [Start with *The Rust Programming Language* first.](https://doc.rust-lang.org/book/)
Don't know JavaScript, HTML, or CSS? [Learn about them on MDN.](https://developer.mozilla.org/en-US/docs/Learn)
[
## How to read this book
](https://rustwasm.github.io/docs/book/#how-to-read-this-book)
You should read [the motivation for using Rust and WebAssembly together](https://rustwasm.github.io/docs/book/why-rust-and-webassembly.html), as well as familiarize yourself with the [background and concepts](https://rustwasm.github.io/docs/book/background-and-concepts.html) first.
The [tutorial](https://rustwasm.github.io/docs/book/game-of-life/introduction.html) is written to be read from start to finish. You should follow along: writing, compiling, and running the tutorial's code yourself. If you haven't used Rust and WebAssembly together before, do the tutorial!
The [reference sections](https://rustwasm.github.io/docs/book/reference/index.html) may be perused in any order.
> **💡 Tip:** You can search through this book by clicking on the 🔍 icon at the top of the page, or by pressing the `s` key.
[
## Contributing to this book
](https://rustwasm.github.io/docs/book/#contributing-to-this-book)
This book is open source! Find a typo? Did we overlook something? [**Send us a pull request!**](https://github.com/rustwasm/book)
@@ -0,0 +1,331 @@
---
page-title: "Learn Rust in Y Minutes"
url: https://learnxinyminutes.com/docs/rust/
date: "2023-04-02 09:39:01"
---
Rust is a programming language developed by Mozilla Research. Rust combines low-level control over performance with high-level convenience and safety guarantees.
It achieves these goals without requiring a garbage collector or runtime, making it possible to use Rust libraries as a “drop-in replacement” for C.
Rusts first release, 0.1, occurred in January 2012, and for 3 years development moved so quickly that until recently the use of stable releases was discouraged and instead the general advice was to use nightly builds.
On May 15th 2015, Rust 1.0 was released with a complete guarantee of backward compatibility. Improvements to compile times and other aspects of the compiler are currently available in the nightly builds. Rust has adopted a train-based release model with regular releases every six weeks. Rust 1.1 beta was made available at the same time of the release of Rust 1.0.
Although Rust is a relatively low-level language, it has some functional concepts that are generally found in higher-level languages. This makes Rust not only fast, but also easy and efficient to code in.
// This is a comment. Line comments look like this...
// and extend multiple lines like this.
/// Documentation comments look like this and support markdown notation.
/// # Examples
///
/// \`\`\`
/// let five = 5
/// \`\`\`
///////////////
// 1. Basics //
///////////////
#\[allow(dead\_code)\]
// Functions
// \`i32\` is the type for 32-bit signed integers
fn add2(x: i32, y: i32) \-> i32 {
// Implicit return (no semicolon)
x + y
}
#\[allow(unused\_variables)\]
#\[allow(unused\_assignments)\]
#\[allow(dead\_code)\]
// Main function
fn main() {
// Numbers //
// Immutable bindings
let x: i32 \= 1;
// Integer/float suffixes
let y: i32 \= 13i32;
let f: f64 \= 1.3f64;
// Type inference
// Most of the time, the Rust compiler can infer what type a variable is, so
// you dont have to write an explicit type annotation.
// Throughout this tutorial, types are explicitly annotated in many places,
// but only for demonstrative purposes. Type inference can handle this for
// you most of the time.
let implicit\_x \= 1;
let implicit\_f \= 1.3;
// Arithmetic
let sum \= x + y + 13;
// Mutable variable
let mut mutable \= 1;
mutable \= 4;
mutable += 2;
// Strings //
// String literals
let x: &str \= "hello world!";
// Printing
println!("{} {}", f, x); // 1.3 hello world
// A \`String\` a heap-allocated string
// Stored as a \`Vec<u8>\` and always hold a valid UTF-8 sequence,
// which is not null terminated.
let s: String \= "hello world".to\_string();
// A string slice an immutable view into another string
// This is basically an immutable pair of pointers to a string it doesnt
// actually contain the contents of a string, just a pointer to
// the begin and a pointer to the end of a string buffer,
// statically allocated or contained in another object (in this case, \`s\`).
// The string slice is like a view \`&\[u8\]\` into \`Vec<T>\`.
let s\_slice: &str \= &s;
println!("{} {}", s, s\_slice); // hello world hello world
// Vectors/arrays //
// A fixed-size array
let four\_ints: \[i32; 4\] \= \[1, 2, 3, 4\];
// A dynamic array (vector)
let mut vector: Vec<i32\> \= vec!\[1, 2, 3, 4\];
vector.push(5);
// A slice an immutable view into a vector or array
// This is much like a string slice, but for vectors
let slice: &\[i32\] \= &vector;
// Use \`{:?}\` to print something debug-style
println!("{:?} {:?}", vector, slice); // \[1, 2, 3, 4, 5\] \[1, 2, 3, 4, 5\]
// Tuples //
// A tuple is a fixed-size set of values of possibly different types
let x: (i32, &str, f64) \= (1, "hello", 3.4);
// Destructuring \`let\`
let (a, b, c) \= x;
println!("{} {} {}", a, b, c); // 1 hello 3.4
// Indexing
println!("{}", x.1); // hello
//////////////
// 2. Types //
//////////////
// Struct
struct Point {
x: i32,
y: i32,
}
let origin: Point \= Point { x: 0, y: 0 };
// A struct with unnamed fields, called a tuple struct
struct Point2(i32, i32);
let origin2 \= Point2(0, 0);
// Basic C-like enum
enum Direction {
Left,
Right,
Up,
Down,
}
let up \= Direction::Up;
// Enum with fields
enum OptionalI32 {
AnI32(i32),
Nothing,
}
let two: OptionalI32 \= OptionalI32::AnI32(2);
let nothing \= OptionalI32::Nothing;
// Generics //
struct Foo<T\> { bar: T }
// This is defined in the standard library as \`Option\`
enum Optional<T\> {
SomeVal(T),
NoVal,
}
// Methods //
impl<T\> Foo<T\> {
// Methods take an explicit \`self\` parameter
fn bar(&self) \-> &T { // self is borrowed
&self.bar
}
fn bar\_mut(&mut self) \-> &mut T { // self is mutably borrowed
&mut self.bar
}
fn into\_bar(self) \-> T { // here self is consumed
self.bar
}
}
let a\_foo \= Foo { bar: 1 };
println!("{}", a\_foo.bar()); // 1
// Traits (known as interfaces or typeclasses in other languages) //
trait Frobnicate<T\> {
fn frobnicate(self) \-> Option<T\>;
}
impl<T\> Frobnicate<T\> for Foo<T\> {
fn frobnicate(self) \-> Option<T\> {
Some(self.bar)
}
}
let another\_foo \= Foo { bar: 1 };
println!("{:?}", another\_foo.frobnicate()); // Some(1)
// Function pointer types //
fn fibonacci(n: u32) \-> u32 {
match n {
0 \=> 1,
1 \=> 1,
\_ \=> fibonacci(n \- 1) + fibonacci(n \- 2),
}
}
type FunctionPointer \= fn(u32) \-> u32;
let fib : FunctionPointer \= fibonacci;
println!("Fib: {}", fib(4)); // 5
/////////////////////////
// 3. Pattern matching //
/////////////////////////
let foo \= OptionalI32::AnI32(1);
match foo {
OptionalI32::AnI32(n) \=> println!("its an i32: {}", n),
OptionalI32::Nothing \=> println!("its nothing!"),
}
// Advanced pattern matching
struct FooBar { x: i32, y: OptionalI32 }
let bar \= FooBar { x: 15, y: OptionalI32::AnI32(32) };
match bar {
FooBar { x: 0, y: OptionalI32::AnI32(0) } \=>
println!("The numbers are zero!"),
FooBar { x: n, y: OptionalI32::AnI32(m) } if n \== m \=>
println!("The numbers are the same"),
FooBar { x: n, y: OptionalI32::AnI32(m) } \=>
println!("Different numbers: {} {}", n, m),
FooBar { x: \_, y: OptionalI32::Nothing } \=>
println!("The second number is Nothing!"),
}
/////////////////////
// 4. Control flow //
/////////////////////
// \`for\` loops/iteration
let array \= \[1, 2, 3\];
for i in array {
println!("{}", i);
}
// Ranges
for i in 0u32..10 {
print!("{} ", i);
}
println!("");
// prints \`0 1 2 3 4 5 6 7 8 9 \`
// \`if\`
if 1 \== 1 {
println!("Maths is working!");
} else {
println!("Oh no...");
}
// \`if\` as expression
let value \= if true {
"good"
} else {
"bad"
};
// \`while\` loop
while 1 \== 1 {
println!("The universe is operating normally.");
// break statement gets out of the while loop.
// It avoids useless iterations.
break
}
// Infinite loop
loop {
println!("Hello!");
// break statement gets out of the loop
break
}
/////////////////////////////////
// 5. Memory safety & pointers //
/////////////////////////////////
// Owned pointer only one thing can own this pointer at a time
// This means that when the \`Box\` leaves its scope, it can be automatically deallocated safely.
let mut mine: Box<i32\> \= Box::new(3);
\*mine \= 5; // dereference
// Here, \`now\_its\_mine\` takes ownership of \`mine\`. In other words, \`mine\` is moved.
let mut now\_its\_mine \= mine;
\*now\_its\_mine += 2;
println!("{}", now\_its\_mine); // 7
// println!("{}", mine); // this would not compile because \`now\_its\_mine\` now owns the pointer
// Reference an immutable pointer that refers to other data
// When a reference is taken to a value, we say that the value has been borrowed.
// While a value is borrowed immutably, it cannot be mutated or moved.
// A borrow is active until the last use of the borrowing variable.
let mut var \= 4;
var \= 3;
let ref\_var: &i32 \= &var;
println!("{}", var); // Unlike \`mine\`, \`var\` can still be used
println!("{}", \*ref\_var);
// var = 5; // this would not compile because \`var\` is borrowed
// \*ref\_var = 6; // this would not either, because \`ref\_var\` is an immutable reference
ref\_var; // no-op, but counts as a use and keeps the borrow active
var \= 2; // ref\_var is no longer used after the line above, so the borrow has ended
// Mutable reference
// While a value is mutably borrowed, it cannot be accessed at all.
let mut var2 \= 4;
let ref\_var2: &mut i32 \= &mut var2;
\*ref\_var2 += 2; // '\*' is used to point to the mutably borrowed var2
println!("{}", \*ref\_var2); // 6 , // var2 would not compile.
// ref\_var2 is of type &mut i32, so stores a reference to an i32, not the value.
// var2 = 2; // this would not compile because \`var2\` is borrowed.
ref\_var2; // no-op, but counts as a use and keeps the borrow active until here
}
Theres a lot more to Rust—this is just the basics of Rust so you can understand the most important things. To learn more about Rust, read [The Rust Programming Language](http://doc.rust-lang.org/book/index.html) and check out the [/r/rust](http://reddit.com/r/rust) subreddit. The folks on the #rust channel on irc.mozilla.org are also always keen to help newcomers.
You can also try out features of Rust with an online compiler at the official [Rust playpen](http://play.rust-lang.org/) or on the main [Rust website](http://rust-lang.org/).
Got a suggestion? A correction, perhaps? [Open an Issue](https://github.com/adambard/learnxinyminutes-docs/issues/new) on the Github Repo, or make a [pull request](https://github.com/adambard/learnxinyminutes-docs/edit/master/rust.html.markdown) yourself!
@@ -0,0 +1,150 @@
---
page-title: "Logto 开源项目:创造令人愉悦的身份体验"
url: https://logto.io/
date: "2023-04-27 19:03:26"
---
![background](https://logto.io/background.eca11ad9.jpg)
一招搞定身份认证和登录授权
轻松构建和保护用户身份信息
基于并最大化利用 OIDC 的身份认证和登录鉴权通用标准,构建专业的登录体验以及用户授权管理。
![authentication and authorization](https://logto.io/figure-1.52645119.png)
支持无密码登录方式以及更多灵活选择
邮箱验证码登录
短信验证码登录
社交账号登录
用户名密码登录
忘记密码
自定义组合登录方式
畅快开发体验,显著提高生产力
使用 Logto 云平台定制、预览,并快速集成到应用中,极大提高产品开发效率。详尽的文档和活跃的社区更会助你事半功倍。
为开发者量身定制的解决方案
强大的 Management API即插即用的 Management API 可以作为您的身份验证提供者,省去了额外的实现工作,并且可以加速你的基础设施搭建。
[
阅读 API 文档
](https://docs.logto.io/docs/recipes/interact-with-management-api)
全平台支持的 SDK面向多种编程语言和近乎全平台支持的 SDK,为你的开发环境量身定制。
[
阅读集成文档
](https://docs.logto.io/docs/recipes/integrate-logto)
灵活多样的连接器选择可通过社区贡献不断扩展、丰富连接器种类,也可以通过我们提供的支持 SAML、OAuth 和 OIDC 标准协议的连接器进行自定义设置。
[
阅读连接器文档
](https://docs.logto.io/docs/references/connectors)
企业级用户管理解决方案
组织(Organization)、多重身份认证(MFA)和单点登录(SSO)等功能正如火如荼开发中,敬请期待。
![blurry background](https://logto.io/light-blur.ba0d1a4e.png)
基于角色的访问控制(RBAC
通过可扩展的角色授权来控制你的资源,以适应不同的使用场景。
[
了解更多
](https://docs.logto.io/docs/recipes/rbac)
![illustration](https://logto.io/rbac.26bb0239.png)
![blurry background](https://logto.io/light-blur.ba0d1a4e.png)
用户管理和审计日志
通过日志了解与身份相关的用户行为,系统安全状况尽在掌控。
[
了解更多
](https://docs.logto.io/docs/recipes/manage-users)
![illustration](https://logto.io/audit-logs.814701e2.png)
心之所向 竭诚而求
来自 GitHub
![avatar](https://avatars.githubusercontent.com/u/4348233?v=4)
Ufuk ArslanCo-Founder of Mobilist
来自 GitHub
![avatar](https://avatars.githubusercontent.com/u/224910?v=4)
André KönigCEO at openformation.io
来自 Reddit
![avatar](https://logto.io/reddit.91746215.png)
Reddit 用户iOS developer
来自 Discord
![avatar](https://avatars.githubusercontent.com/u/13367662?v=4)
ZohaFront-end developer
来自 Discord
![avatar](https://avatars.githubusercontent.com/u/25107942?v=4)
OlynoIndie developer
来自 Discord
![avatar](https://avatars.githubusercontent.com/u/47457170?v=4)
ZR3SYSTEMSDeveloper
极速上手集成和测试
试用 Logto Cloud 预览版
云端预览是 Logto Cloud 的一个令人兴奋的早期版本,它展示了 Logto Cloud 的全部功能。虽然不建议用于生产环境,但它是测试和集成 Logto 的绝佳机会。[了解更多](https://docs.logto.io/about/cloud-preview/)
[
Cloud 预览
](http://cloud.logto.io/?sign_up=true)
下载并部署 Logto 开源版
与其它解决方案相比,Logto 开源身份验证解决方案对开发者更为友好,简单易用。它拥有强大的功能和灵活的架构,只需要几分钟即可快速构建、测试和部署。
[
开始上手
](https://docs.logto.io/docs/tutorials/get-started)
@@ -0,0 +1,35 @@
---
page-title: "MistGPU - 深度学习雾计算平台"
url: https://mistgpu.com/
date: "2023-04-23 13:09:44"
---
![](https://static.mistgpu.com/pic/gpu.svg)
GPU加速
GPU可为深度学习运算加速
显著提高AI模型开发和训练的效率
![](https://static.mistgpu.com/pic/clock.svg)
按时间计费
仅使用时按分钟计费
随时暂停和继续
![](https://static.mistgpu.com/pic/check-square.svg)
已配置环境
预装Tensorflow PyTorch
等深度学习框架
不再为配置环境耗费时间
![](https://static.mistgpu.com/pic/code.svg)
在线开发环境
除SSH连接外
更可一键开启Jupyter终端
也连接使用图形界面
即刻开始编写代码
@@ -0,0 +1,50 @@
---
page-title: "Most Useful ChatGPT Prompts"
url: https://www.explainthis.io/en/chatgpt
date: "2023-04-20 08:56:52"
---
Copy
##### Write a function
Your are programming language expert, please write a function that can do something.
👉 You are a JavaScript expert, please write a function that can do input a one-dimensional array, convert this one-dimensional array into a two-dimensional array. At the same time, I can freely decide the length of the subarray in the two-dimensional array.
Copy
##### Explain Code
You are a programming language expert, please explain the following code to me. attach code
👉 You are a Rust expert, please explain the following Rust code to me. \[attach code\]
Copy
##### Refactor Code
You are a Clean Code expert, I have the following code, please refactor it in a more clean and concise way so that my colleagues can maintain the code more easily. Also, explain why you want to refactor the code so that I can add the explanation to the Pull Request. attach code
Copy
##### Debug
You are a programming language expert, I have a piece of code and, I expect this code to do something, but it fails the test case. Please help me find out what I did wrong and rewrite it in the correct way. attach code
👉 You are a C++ expert. I have a piece of code and I expect this code to check if a string is a palindrome, but it fails the test case abbccde. Please help me find out what I did wrong and rewrite it in the correct way. \[attach code\]
Copy
##### Write test
You are a programming language expert, I have a piece of code attach code, please write tests for it. Please provide at least number test cases, and cover the extreme cases, so that I can be sure that my code is correct. attach code
👉 You are a python expert. I have a piece of code \[attach code\], please write a test for it. Please provide at least 5 test cases, and cover the extreme cases, so that I can be sure that my code is correct. \[attach code\]
Copy
##### Write Regex
You are now a Regex Expert, please write a Regex that can do something
👉 You are now a Regex Expert, please write a Regex that can extract all the numbers from a string
@@ -0,0 +1,101 @@
---
page-title: "PowerDNS pdnsutil cheat sheet - Makarainen"
url: https://makarainen.net/PowerDNS-pdnsutil-cheat-sheet
date: "2023-04-19 20:58:11"
---
## PowerDNS pdnsutil cheat sheet
![PowerDNS logo](https://upload.wikimedia.org/wikipedia/en/8/8d/Official_PowerDNS_logo_250_pixels.png "PowerDNS logo")
This is an extremely simple tutorial on how to manage data in the [PowerDNS Authoritative Server](https://www.powerdns.com/auth.html) using the command line "[pdnsutil](https://doc.powerdns.com/authoritative/manpages/pdnsutil.1.html)" tool. The guide is written in the "walk through" format: create zone - add data - update serial.
### CREATE ZONE
```
pdnsutil create-zone example.com
```
### ADD DATA TO ZONE // Let's start by adding the root A-record and AAAA for IPv6 (makarainen.net)
```
pdnsutil add-record example.com @ A 192.168.1.2
pdnsutil add-record example.com @ AAAA 2a01:4f9:c010:30f4::1
```
### ADD DATA TO ZONE // adding a subdomain (www)
```
pdnsutil add-record example.com www A 192.168.1.2
```
### ADD DATA TO ZONE // every domain needs name servers
```
pdnsutil add-record example.com @ NS ns1.example.com
```
### ADD DATA TO ZONE
```
pdnsutil add-record example.com @ MX "10 example.com"
pdnsutil add-record example.com 3600 TXT "google-site-verification=example-id"
```
### MANAGE ZONES // check the information provided
```
pdnsutil list-zone example.com
```
### MANAGE ZONES // modify the zone (if changes do not miss update serial -> UPDATE SERIAL)
```
pdnsutil edit-zone example.com
```
### MANAGE ZONES
```
pdnsutil check-all-zones
pdnsutil show-zone example.com
```
### DELETE A SPECIFIC ZONE
```
pdnsutil delete-zone example.com
```
### UPDATE SERIAL
```
pdnsutil increase-serial example.com
```
### UPDATE THE CONNECTED DNS SERVERS
```
pdns_control notify example.com
```
### START THE POWERDNS SERVER IN UBUNTU
```
service pdns start
```
### Questions
Where do I enter a SOA-record? - No, you don't have to enter it. PowerDNS generates it automatically when you update the serial. However, specify initialization values in the /etc/powerdns/pdns.conf file.
### Explore more
Find out how the background system can be managed [PowerDNS export from MySQL to csv using command line](https://makarainen.net/powerdns-export-from-mysql-to-csv-using-command-line)
### Noteworthy deal
[Domainparkki](https://domainparkki.com/) may be able to help if you need plain name server services for hobby/low volume use. Only 5 euros +VAT per zone per year. One zone = one domain, including 20 records per zone and 1 billion queries per month (excess traffic is billed separately). Open the link above and check it out. Inquiries by email [hello@domainparkki.com](mailto:hello@domainparkki.com).
*// viHannes, 12 Feb 2022 in Helsinki, Finland*
+180
View File
@@ -0,0 +1,180 @@
---
page-title: "Prerequisites"
url: https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/Prerequisites.html
date: "2023-04-23 18:20:19"
---
## Prerequisites
You must perform the following steps before installing ROCm and check if the system meets all the requirements to proceed with the installation.
Follow these steps:
1.      Confirm the system has a supported Linux distribution version.
2.      Confirm the system has a ROCm-capable GPU.
3.      Confirm the system has all the required tools and packages installed.
## Confirm the System Has a Supported Linux Distribution Version
The ROCm installation is supported only on specific Linux distributions and kernel versions.
NOTE:
ROCm installation is not supported on 32-bit operating systems.
### Check the Linux Distribution and Kernel Version on Your System
This section discusses obtaining information about the Linux distribution and kernel version.
#### Linux Distribution Information
Verify the Linux distribution using the following steps:
1.     To obtain the Linux distribution information, type the following command on your system from the Command Line Interface (CLI):
**2.**     Confirm that the obtained Linux distribution information matches with [System Requirements.](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/Introduction_to_ROCm_Installation_Guide_for_Linux.html#d4616e529)
  **E****xample****:** Running the command above on an Ubuntu system results in the following output:
#### Kernel Information
Verify the kernel version using the following steps:
1.     To check the kernel version of your Linux system, type the following command:
2.     Confirm that the obtained kernel version information matches with [System Requirements.](https://docs.amd.com/bundle/ROCm-Installation-Guide-v5.4.3/page/Introduction_to_ROCm_Installation_Guide_for_Linux.html#d4616e529)
**Example:** The output of the command above lists the kernel version in the following format:
## Confirm the System has a ROCm-Capable GPU
The ROCm platform is designed to support the following GPUs:
**Table 2****.** **GPU** **S****upport for** **ROCm** **P****rogramming** **M****odels**
**Classification**
**GPU Name**
**GFX** **ID**
**Product Id**
**GFX9 GPUs**
AMD Radeon Instinct™ MI50
gfx906
Vega 20
AMD Radeon Instinct™ MI60
AMD Radeon™ VII
AMD Radeon™ Pro VII
**RDNA GPUs**
AMD Radeon™ Pro W6800
gfx1030
Navi 21 GL-XL
AMD Radeon™ Pro V620
Navi 21 GL-XE
**CDNA GPUs**
AMD Instinct™ MI100
gfx908
Arcturus
AMD Instinct™ MI200
gfx90a
Aldebaran
### Verify Your System Has a ROCm-Capable GPU
To verify that your system has a ROCm-capable GPU, use these steps:
1.     Enter the following command from the Command Line Interface (CLI):
The command displays the details of detected GPUs on the system in the following format in the case of AMD Instinct™ MI200:
2.     Verify from the output that the listed product names match with the Product Id given in the table above.
## Confirm the System Has All the Required Tools and Packages Installed
To check if the required tools and packages are available on the system, refer the following sections.
### Required Packages
Verify if the wget, gnupg2, gawk and curl packages are available on your system using the following command based on your OS distribution:
**U****buntu****/D****ebian**
**RHEL**
**SLES/O****pen****SUSE**
If the wget, gnupg2, gawk and curl packages are not available on your system, install using the following commands based on your OS distribution:
**U****buntu****/D****ebian**
**RHEL**
**SLES/O****pen****SUSE**
### Register the System to the Subscription Manager
**RHEL v8.x/9.x**
To register RHEL v8.x/9.x system to the subscription manager, refer to the following documentation:
[https://access.redhat.com/solutions/253273](https://access.redhat.com/solutions/253273)  
**SLES** **15** **SP****4**
To register SLES 15 SP4 system, refer to the following documentation:
[https://documentation.suse.com/sles/12-SP5/single-html/SLES-smt/index.html](https://documentation.suse.com/sles/12-SP5/single-html/SLES-smt/index.html)
### Enable Additional Repositories
Use the following commands to get the required tools and packages.
**RHEL** **v****8.x**
Install the EPEL repository and enable the CodeReady Linux Builder repository on RHEL v8.x using the commands below:
**RHEL** **v9****.x**
Use the following command to download and install EPEL from [https://dl.fedoraproject.org](https://dl.fedoraproject.org/) for RHEL v9.x:
**SLES** **15** **SP4**
Add the perl repository using the following commands:
### Setting Permissions for Groups
This section provides steps to add any current user to a video group to access GPU resources.
1.     To check the groups in your system, issue the following command:
2.     Add yourself to the render or video group using the following instruction:
3.     Use of the video group is recommended for all ROCm-supported operating systems.
NOTE:
render group is required only for Ubuntu v20.04.
To add future users to the video and render groups, run the following command:
@@ -0,0 +1,418 @@
---
page-title: "Self hosted mail server if ? then : else"
url: https://www.ifthenel.se/self-hosted-mail-server/
date: "2023-04-27 17:18:34"
---
I have had enough. Its bad enough that social media has become the scourge of the Internet, but that doesnt mean key services such as email should have to be stronghold(ed?) by Big Corp such as Google, Microsoft, and other massive vendors.
The Internet was built on a foundation of globally connected computers that chose to share information between eachother and all was well.
Now, pretty much \_EVERYTHING\_ on the web is behind some kind of walled garden and/or being harvested for user behaviour studies to increase revenue (through ads, mostly).
But Id like to see if I can do something about this, in as far as my capabilities goes; its time to “take back” (Ive actually never hosted my own email server before, so its more of a “move the responsibility of”) my emails.
This is a part guide, part resource, part tutorial on how I set my email up on a VPS service. You wont be getting every single step as a command or how to edit your DNS records for your control panel on your registrar, but you should at least get a fairly detailed explanation of all the steps that are involved.
## A word of thanks
Id like to thank all the people involved for their tireless efforts in providing a solid out-of-the-box selfhostable mail server. I am a huge fan of all the individuals that put their time into creating a set of tools such as docker-mailserver and make it \_next\_ to a no-brainer to get it up and running.
Lets get to the grind.
## Tech stack
I have chosen to use the following techs
- External VPS hosting It is fairly cheap, and email shouldnt require exorbitant amounts of resources, and you \_have to\_ be able to edit reverse DNS records
- Debian 10 No particular reason other than I like Debian
- [docker-mailserver](https://github.com/docker-mailserver/docker-mailserver) It has proven to be a one stop shop for an easy (well) get up and running component stack of different software that can deal with email
## Look at your inventory before you move on
### IP blacklisting delisting
Make sure your chosen server host isnt on any kind of IP or email blacklist. This activity is a tough one with a big risk of being costly (as in $$$) since you
- probably dont know what IP you get (this post assumes 123.123.123.123)
- dont know if that IP is on any list yet
- may not know of any tools can help you figure out what lists you are on
I dont have an answer to all of this. You can use [MX Toolboxs blacklist lookup tool](https://mxtoolbox.com/blacklists.aspx), but there are probably a lot more blacklisting going on that you will want to try and find so you have an ounce more chance of not getting you emails flagged as spam from the getgo.
I got to know my IP was on the BARRACUDA blacklist and I made an attempt at sending in a delisting request through their online form, and I seem to have been released from their clutches.
Microsoft/Outlook/Office are picky as all get out as well, so make additional efforts to get your IP delisted from there as well, even if you suspect youre not on their list: [https://sender.office.com/](https://sender.office.com/)
### rDNS (reverse DNS)
Get a host that supports rDNS (reverse DNS) and set a reverse value to something that you own, so that when a lookup happens (be it forward or reverse), they get *the same* hostnames and IP. E.g.;
$ host my.host // returns: "my.host has address 123.123.123.123"
$ dig +noall +answer -x 123.123.123.123 // returns: "123.123.123.123-in-addr.arpa \[number\] IN PTR my.host"
You could also use [MX Toolbox reverse lookup tool](https://mxtoolbox.com/ReverseLookup.aspx) to test this by supplying your mail hosts IP address and have it look this up for you.
## Setting up docker-mailserver (and moar)
### docker-mailserver
**THIS GUIDE ONLY COVERS docker-mailserver v10.2 AND LATER!**
1. Install `docker` and `docker-compose` on your host
2. Clone the docker-mailserver git repo (this way you will get all necessary files to start off including one of my personal favourites; `docker-compose.yml`): `git clone https://github.com/docker-mailserver/docker-mailserver`
3. Read the docker environment and topics following in the official README [https://github.com/docker-mailserver/docker-mailserver#create-a-docker-compose-environment](https://github.com/docker-mailserver/docker-mailserver#create-a-docker-compose-environment)
4. Do as the README suggests and then start the mailserver
$ `docker-compose up`
5. Wait for the startup to fail with a message along the lines of *mailserver | \[ ERROR \] Shutting down..*
6. Shut down the server again
`$ docker-compose down`
**Here be dragons. Read this. Its important.** I have based a lot of this tutorial from [https://docker-mailserver.github.io/docker-mailserver/edge/examples/tutorials/basic-installation/](https://docker-mailserver.github.io/docker-mailserver/edge/examples/tutorials/basic-installation/) but this specific step we are coming to, creating keys for DKIM, is missing a crucial part; you have to create a mail account on your mail server before generating the DKIM. Why? No idea yet. Why isnt it mentioned in the doc? Beats me. But you should really really make it clear to the authors of this document that this is a serious flaw to not have included. I spent a lot of time on google to figure this out…..
1. Add an account to your mailserver:
`$ docker-compose run mailserver setup email add someone@example.com` and input a password when requested
2. Set up DKIM with your docker-mailserver tag of choice:
`$ docker-compose run mailserver setup config dkim`
When you have gotten this far without issues, you should be able to start the mailserver without the initial errors:
`$ docker-compose up -d`
You should now be able to interact with the server using the command pattern `docker-compose exec mailserver` from here on.
### DNS
This part is tricky, because DNS records are finicky, they need to be thoroughly tested and take HEAPS of time to update. You will spend quite some time with this if you dont get it right on the first try. Get yourself a couple of days vacation for this part.
#### DKIM
- TXT record
- Hostname: `mail._domainkey.my.domain`
- Value: Whatever is in the opendkim text file
Add the newly created DKIM details to your domains DNS records by first echoing them for easy copy and paste:
`$ cat config/opendkim/keys/my.domain/mail.txt`
This produces something you should add to your DNS records. Heres the kicker; The strings are long and deliberately cut off because the maintainers dont know if your DNS hoster supports strings that are longer than 255 characters in length. So, you will have either a good time entering these as you might know your DNS hosters limitations, or, more likely, a bad time and you have to figure out how to get these details stored properly. Theres some help though. MX Toolbox has a DKIM checker that you can utilise to verify you have your stuff set up right: https://mxtoolbox.com/dkim.aspx Good luck.
In the DNS editor, your hostname for this TXT record should be `mail._domainkey.my.domain` and the value should be the long ass string output from the cat command above.
After a long wait, check with the [MX Toolbox DKIM Lookup](https://mxtoolbox.com/dkim.aspx)
#### SPF
- TXT record
- Hostname: @
- Value: `v=spf1 mx ~all`
This is simpler, because there are very few parameters. Its still required for your emails to have a decent chance of not being marked as spam. There can be some benefit to adding refernces to *other* known SPF records, such as tthe ones used by Outlook, etc. One of those is “`spf.protection.outlook.com`
Add a TXT record to your `@` (hostname/zone/whatitscalled) with the value: `v=spf1 mx ~all`
Tip: If you want to add Microsoft Outlooks SPF, you would change the value to `v=spf1 include:spf.protection.outlook.com mx ~all`
#### Subdomain
- A record
- Hostname: mail
- Value: IP address of your mail server host
Also a simpler DNS record change. You want to have a subdomain that keeps tabs on the IP address of you mail server host.
1. Add an A record to the subdomain `mail` with the value of your mail server host IP address
#### MX
- MX record
- Hostname: `@` or `mail.my.domain.`
- Value: `mail.my.domain`
This is used for telling every server on the internets that you have a mail server somewhere with a certain subdomain name
1. Add an MX record to the `@` (hostname/zone/whatitscalled) with the value:
`mail.my.host.`
#### DMARC
- TXT record
- Hostname: \_dmarc.my.domain
- Value: `v=DMARC1; p=quarantine; rua=mailto:postmaster@my.domain; ruf=mailto:postmaster@my.domain; fo=1; adkim=s; aspf=s; pct=100; rf=afrf; ri=86400; sp=quarantine`
Complicateder piece of DNS record than the last two, because there are a bunch of parameters in the TXT records that you should read up on and understand. Ill just give you what I use for now.
1. Add a TXT record to the `_dmarc` hostname with the value: `v=DMARC1; p=quarantine; rua=mailto:postmaster@my.domain; ruf=mailto:postmaster@my.domain; fo=1; adkim=s; aspf=s; pct=100; rf=afrf; ri=86400; sp=quarantine`
### Testing
Heres the part where you need to verify and verify again that everthing is in working order. Mostly MX Toolbox to the rescue.
#### MX
- [https://mxtoolbox.com/MXLookup.aspx](https://mxtoolbox.com/MXLookup.aspx)
- Format: my.domain
What you are looking for in the results is something along the lines of
- Pref: 0
- Hostname: my.domain
- IP address: 123.123.123.123
If there are more than one result in the table, you want to ensure your email server, the one with the IP of 123.123.123.123, is at the top, with a “Pref” (priority) value that is lower than any of the others.
#### SPF
- [https://mxtoolbox.com/spf.aspx](https://mxtoolbox.com/spf.aspx)
- Format: my.domain
What you are looking for in the results is something along the lines of 4 rows, detailing the parameters of the SPF record. For instance, if the SPF record in DNS was set to: “v=spf1 include:spf.protection.outlook.com mx ~all” you want a result such as:
v
spf1
The SPF record version
+
include
spf.protection.outlook.com
Pass
The specified domain is searched for an allow.
+
mx
Pass
Match if IP is one of the MX hosts for given domain name.
~
all
SoftFail
Always matches. It goes at the end of your record.
#### DKIM
- https://mxtoolbox.com/dkim.aspx
- Format: my.domain:mail
What you are looking for in the results is something along the lines of 4 rows, detailing the parameters of the DKIM record. For instance, if the DKIM (mail.\_domainkey) was set to: “v=DKIM1; h=sha256; k=rsa; p=jasdfjidjelajdvlkjg” you want a result such as:
v
DKIM1
Version
Identifies the record retrieved as a DKIM record. It must be the first tag in the record.
h
sha256
Hash Algorithms
A colon-separated list of hash algorithms that might be used.
k
rsa (Length: 4096 bits)
Key Type
Key Type The type of the key used by tag (p).
p
jasdfjidjelajdvlkjg
Public Key
The syntax and semantics of this tag value before being encoded in base64 are defined by the (k) tag.
#### DMARC
- https://mxtoolbox.com/dmarc.aspx
- Format: my.domain
What you are looking for in the results is something along the lines of 10 rows, detailing the parameters of the DMARC record. For instance, if the DMARC (my.domain) was set to: “`v=DMARC1; p=quarantine; rua=mailto:postmaster@my.domain; ruf=mailto:postmaster@my.domain; fo=1; adkim=s; aspf=s; pct=100; rf=afrf; ri=86400; sp=quarantine`” you want a result such as:
v
DMARC1
Version
Identifies the record retrieved as a DMARC record. It must be the first tag in the list.
p quarantine Policy Policy to apply to email that fails the DMARC test. Valid values can be none, quarantine, or reject.
p
quarantine
Policy
Policy to apply to email that fails the DMARC test. Valid values can be none, quarantine, or reject.
rua
mailto:postmaster@my.domain
Receivers
resses to which aggregate feedback is to be sent. Comma separated plain-text list of DMARC URIs.
ruf
mailto:postmaster@my.domain
Forensic Receivers
Addresses to which message-specific failure information is to be reported. Comma separated plain-text list of DMARC URIs.
fo
1
Forensic Reporting
Provides requested options for generation of failure reports. Valid values are any combination of characters 01ds seperated by :.
adkim
s
Alignment Mode DKIM
Indicates whether strict or relaxed DKIM Identifier Alignment mode is required by the Domain Owner. Valid values can be r (relaxed) or s (strict mode).
adpf
s
Alignment Mode SPF
Indicates whether strict or relaxed SPF Identifier Alignment mode is required by the Domain Owner. Valid values can be r (relaxed) or s (strict mode).
pct
100
Percentage
Percentage of messages from the Domain Owners mail stream to which the DMARC policy is to be applied. Valid value is an integer between 0 to 100.
rf
afrf
Forensic Format
Format to be used for message-specific failure reports. Valid values are afrf and iodef.
ri
86400
Reporting Interval
Indicates a request to Receivers to generate aggregate reports separated by no more than the requested number of seconds. Valid value is a 32-bit unsigned integer.
sp
quarantine
Sub-domain Policy
Requested Mail Receiver policy for all subdomains. Valid values can be none, quarantine, or reject.
Theres also a test results table, where you want all the checkmarks to turn up green.
## TLS Cert using letsencrypt
My weapon of choice is and will probably for a long time be certbot/letsencrypt. I chose to use the officially provided script in “certonly” mode. It is fully possible to acquire a certificate without involing anything else. I had a small bump in the road where I included a domain that had an A record for my HTTP services and that failed the whole process because the HTTP service wouldnt supply the info needed for certbot to complete. The gist of the command, though, is:
$ sudo certbot certonly --standalone -d mail.my.domain1 -d mail.my.domain2 \[more parameters\]
and follow the instructions. Make sure to supply the *mail* domain, e.g. `mail.my.domain` and not only the root domain, as it can make things end up like it did for me in the beginning, where I dont have a webserver that can properly reply on the ports/URL:s that certbot expects.
Now, edit the `docker-compose.yml` file to add a volume that points to the letsencrypt cert store path. For my setup this would result in a line under the volumes-section:
...
- /etc/letsencrypt:/etc/letsencrypt:ro
...
Dont forget to restart your docker-mailserver, as a reload of details is required.
## Catchall for everything but valid email accounts
This took some digging around. docker-mailserver isnt really the authority here, but postfix, thats included in docker-mailserver. I did find a couple of nice pointers in the docker-mailserver issue tracker that gave me the following understanding to get catchall to work as I expect; Catching all email to a single catchall-specific mail account, and deliver mail designated to valid accounts without ending up in both catchall and the valid account inbox:
- Valid accounts need to have aliases to themselves
- The domain, e.g. my.domain, need to have an alias pointing to the catchall account
So, for the sake of completeness, this is how would go about it:
1. Create any valid email account(s) (these will require their own passwords)
2. Create the catchall account (this will also require its own password)
3. Create an alias to the catchall account with
`$ docker-compose exec mailserver setup alias add @my.domain @catchall.my.domain`
4. Edit the newly created file `config/postfix-virtual.cf` and modify it to the following format:
account1@my.domain account1@my.domain
account2@my.domain account2@my.domain
...
@my.domain catchall@my.domain
**The order is crucial.** You want the catchall to be at the bottom of this file at all times.
## Multiple domains, one server
This ties into the TLS Cert section, insofar that the command to generate valid certificates is:
$ sudo certbot certonly --standalone -d mail.my.domain1 -d mail.my.domain2 \[more parameters\]
and you will need to secure that you have your docker-compose.yml file set up to take into account the certificates:
...
\- /etc/letsencrypt:/etc/letsencrypt:ro
...
and you need to have restarted docker-mailserver to have it react to those changes.
And, you also need to have updated the `mailserver.env` file to tell docker-mailserver that youll be using letsencrypt.
Other than that, theres a few more things needed for your *second domain*. It is in general much the same as your primary domain, except for a few specific details that need to be unique to your second domain. Heres the complete list as to not miss out on anything
- MX DNS record
- SPF DNS record
- DKIM DNS record
- DMARC DNS record
- An email account tied to the second domain
Ok, thats a lot of stuff again! But heres the kicker; a few of them you can use as they mostly are from your primary domain, and others are super easy to set up.
The ones you can copy and easily modify from your primary domain are
- MX record You will use the same IP address for this as the primary one
- SPF record You use the same TXT value as the primary one
- DMARC record You use the same TXT value as the primary one, but I also modified the postmaster email address to align with the second domain
And this is the part where you need to do a little more work
### DKIM
This is very much like generating DKIM from the setup steps in this page;
1. Create an email account, e.g. `postmaster@second.domain`
2. Generate the DKIM DNS record details by running `$ docker-compose run mailserver setup config dkim` which will generate new keyfiles for your new domain (remember that the setup-script use the domain names of already created accounts to determine what domains to generate DKIM DNS records for)
3. Copy and paste the value from `$ cat config/opendkim/keys/second.domain/mail.txt` and create a new DNS record as explained in the DKIM-section in the setup steps on this page.
###### Changelog summary, 2021-10-14
@@ -0,0 +1,83 @@
---
page-title: "Slurm Workload Manager - Overview"
url: https://slurm.schedmd.com/overview.html
date: "2023-04-23 13:09:14"
---
## Overview
Slurm is an open source, fault-tolerant, and highly scalable cluster management and job scheduling system for large and small Linux clusters. Slurm requires no kernel modifications for its operation and is relatively self-contained. As a cluster workload manager, Slurm has three key functions. First, it allocates exclusive and/or non-exclusive access to resources (compute nodes) to users for some duration of time so they can perform work. Second, it provides a framework for starting, executing, and monitoring work (normally a parallel job) on the set of allocated nodes. Finally, it arbitrates contention for resources by managing a queue of pending work. Optional plugins can be used for [accounting](https://slurm.schedmd.com/accounting.html), [advanced reservation](https://slurm.schedmd.com/reservations.html), [gang scheduling](https://slurm.schedmd.com/gang_scheduling.html) (time sharing for parallel jobs), backfill scheduling, [topology optimized resource selection](https://slurm.schedmd.com/topology.html), [resource limits](https://slurm.schedmd.com/resource_limits.html) by user or bank account, and sophisticated [multifactor job prioritization](https://slurm.schedmd.com/priority_multifactor.html) algorithms.
## Architecture[](https://slurm.schedmd.com/overview.html#architecture)
Slurm has a centralized manager, **slurmctld**, to monitor resources and work. There may also be a backup manager to assume those responsibilities in the event of failure. Each compute server (node) has a **slurmd** daemon, which can be compared to a remote shell: it waits for work, executes that work, returns status, and waits for more work. The **slurmd** daemons provide fault-tolerant hierarchical communications. There is an optional **slurmdbd** (Slurm DataBase Daemon) which can be used to record accounting information for multiple Slurm-managed clusters in a single database. There is an optional [**slurmrestd** (Slurm REST API Daemon)](https://slurm.schedmd.com/rest.html) which can be used to interact with Slurm through its [REST API](https://en.wikipedia.org/wiki/Representational_state_transfer). User tools include **srun** to initiate jobs, **scancel** to terminate queued or running jobs, **sinfo** to report system status, **squeue** to report the status of jobs, and **sacct** to get information about jobs and job steps that are running or have completed. The **sview** commands graphically reports system and job status including network topology. There is an administrative tool **scontrol** available to monitor and/or modify configuration and state information on the cluster. The administrative tool used to manage the database is **sacctmgr**. It can be used to identify the clusters, valid users, valid bank accounts, etc. APIs are available for all functions.
![](https://slurm.schedmd.com/arch.gif)
Figure 1. Slurm components
Slurm has a general-purpose plugin mechanism available to easily support various infrastructures. This permits a wide variety of Slurm configurations using a building block approach. These plugins presently include:
- Accounting Storage: Primarily Used to store historical data about jobs. When used with SlurmDBD (Slurm Database Daemon), it can also supply a limits based system along with historical system status.
- Account Gather Energy: Gather energy consumption data per job or nodes in the system. This plugin is integrated with the Accounting Storage and Job Account Gather plugins.
- Authentication of communications: Provides authentication mechanism between various components of Slurm.
- [Containers](https://slurm.schedmd.com/containers.html): HPC workload container support and implementations.
- Credential (Digital Signature Generation): Mechanism used to generate a digital signature, which is used to validate that job step is authorized to execute on specific nodes. This is distinct from the plugin used for Authentication since the job step request is sent from the user's srun command rather than directly from the slurmctld daemon, which generates the job step credential and its digital signature.
- [Generic Resources](https://slurm.schedmd.com/gres.html): Provide interface to control generic resources, including Graphical Processing Units (GPUs).
- [Job Submit](https://slurm.schedmd.com/job_submit_plugins.html): Custom plugin to allow site specific control over job requirements at submission and update.
- Job Accounting Gather: Gather job step resource utilization data.
- Job Completion Logging: Log a job's termination data. This is typically a subset of data stored by an Accounting Storage Plugin.
- Launchers: Controls the mechanism used by the ['srun'](https://slurm.schedmd.com/srun.html) command to launch the tasks.
- MPI: Provides different hooks for the various MPI implementations. For example, this can set MPI specific environment variables.
- [Preempt](https://slurm.schedmd.com/preempt.html): Determines which jobs can preempt other jobs and the preemption mechanism to be used.
- Priority: Assigns priorities to jobs upon submission and on an ongoing basis (e.g. as they age).
- Process tracking (for signaling): Provides a mechanism for identifying the processes associated with each job. Used for job accounting and signaling.
- Scheduler: Plugin determines how and when Slurm schedules jobs.
- Node selection: Plugin used to determine the resources used for a job allocation.
- [Site Factor (Priority)](https://slurm.schedmd.com/site_factor.html): Assigns a specific site\_factor component of a job's multifactor priority to jobs upon submission and on an ongoing basis (e.g. as they age).
- Switch or interconnect: Plugin to interface with a switch or interconnect. For most systems (Ethernet or InfiniBand) this is not needed.
- Task Affinity: Provides mechanism to bind a job and its individual tasks to specific processors.
- Network Topology: Optimizes resource selection based upon the network topology. Used for both job allocations and advanced reservation.
The entities managed by these Slurm daemons, shown in Figure 2, include **nodes**, the compute resource in Slurm, **partitions**, which group nodes into logical sets, **jobs**, or allocations of resources assigned to a user for a specified amount of time, and **job steps**, which are sets of (possibly parallel) tasks within a job. The partitions can be considered job queues, each of which has an assortment of constraints such as job size limit, job time limit, users permitted to use it, etc. Priority-ordered jobs are allocated nodes within a partition until the resources (nodes, processors, memory, etc.) within that partition are exhausted. Once a job is assigned a set of nodes, the user is able to initiate parallel work in the form of job steps in any configuration within the allocation. For instance, a single job step may be started that utilizes all nodes allocated to the job, or several job steps may independently use a portion of the allocation. Slurm provides resource management for the processors allocated to a job, so that multiple job steps can be simultaneously submitted and queued until there are available resources within the job's allocation.
![](https://slurm.schedmd.com/entities.gif)
Figure 2. Slurm entities
## Configurability[](https://slurm.schedmd.com/overview.html#configurability)
Node state monitored include: count of processors, size of real memory, size of temporary disk space, and state (UP, DOWN, etc.). Additional node information includes weight (preference in being allocated work) and features (arbitrary information such as processor speed or type). Nodes are grouped into partitions, which may contain overlapping nodes so they are best thought of as job queues. Partition information includes: name, list of associated nodes, state (UP or DOWN), maximum job time limit, maximum node count per job, group access list, priority (important if nodes are in multiple partitions) and shared node access policy with optional over-subscription level for gang scheduling (e.g. YES, NO or FORCE:2). Bit maps are used to represent nodes and scheduling decisions can be made by performing a small number of comparisons and a series of fast bit map manipulations. A sample (partial. Slurm configuration file follows.
#
# Sample /etc/slurm.conf
#
SlurmctldHost=linux0001 # Primary server
SlurmctldHost=linux0002 # Backup server
#
AuthType=auth/munge
Epilog=/usr/local/slurm/sbin/epilog
PluginDir=/usr/local/slurm/lib
Prolog=/usr/local/slurm/sbin/prolog
SlurmctldPort=7002
SlurmctldTimeout=120
SlurmdPort=7003
SlurmdSpoolDir=/var/tmp/slurmd.spool
SlurmdTimeout=120
StateSaveLocation=/usr/local/slurm/slurm.state
TmpFS=/tmp
#
# Node Configurations
#
NodeName=DEFAULT CPUs=4 TmpDisk=16384 State=IDLE
NodeName=lx\[0001-0002\] State=DRAINED
NodeName=lx\[0003-8000\] RealMemory=2048 Weight=2
NodeName=lx\[8001-9999\] RealMemory=4096 Weight=6 Feature=video
#
# Partition Configurations
#
PartitionName=DEFAULT MaxTime=30 MaxNodes=2
PartitionName=login Nodes=lx\[0001-0002\] State=DOWN
PartitionName=debug Nodes=lx\[0003-0030\] State=UP Default=YES
PartitionName=class Nodes=lx\[0031-0040\] AllowGroups=students
PartitionName=DEFAULT MaxTime=UNLIMITED MaxNodes=4096
PartitionName=batch Nodes=lx\[0041-9999\]
Last modified 6 August 2021
@@ -0,0 +1,196 @@
---
page-title: "Steamship Documentation"
url: https://docs.steamship.com/
date: "2023-04-17 08:40:46"
---
[Back to top](https://docs.steamship.com/#)
[Edit this page](https://github.com/steamship-core/python-client/edit/main/docs/index.rst "Edit this page")
Toggle table of contents sidebar
## Steamship[#](https://docs.steamship.com/#steamship "Permalink to this heading")
Steamship is the fastest way to add AI to your software.
Think of Steamship as both a package manager and package hosting for AI. Each [Steamship package](https://www.steamship.com/packages) runs in the cloud on a managed stack.
## Steamship in 30 seconds[#](https://docs.steamship.com/#steamship-in-30-seconds "Permalink to this heading")
- [Use Plugins](https://docs.steamship.com/plugins/using/index.html#using-plugins) for common operations like generating text with GPT, converting a CSV to text, or generating an image from text. Steamship manages asynchronicity and retries.
- [Store data in Files, Blocks, and Tags](https://docs.steamship.com/data/index.html#data-model). This allows you to [query](https://docs.steamship.com/data/queries/index.html#queries) or [search](https://docs.steamship.com/embedding-search/index.html#embedding-search-index) it later.
- [Deploy as a Package](https://docs.steamship.com/packages/developing/index.html#developing-packages), creating a scalable API for your front end.
- [Create as many instances of the Package](https://docs.steamship.com/packages/developing/index.html#creating-package-instances) as you want, each with its own data.
The best way to start is to make a simple package:
## Start from a template[#](https://docs.steamship.com/#start-from-a-template "Permalink to this heading")
Clone one of our starter packages ([https://github.com/steamship-packages](https://github.com/steamship-packages)):
git clone https://github.com/steamship-packages/empty-package.git
Create a virtual environment and install dependencies:
python3 \-m venv venv
source venv/bin/activate
pip install \-r requirements.txt
pip install \-r requirements.dev.txt
and start editing `src/api.py`.
## Start from scratch[#](https://docs.steamship.com/#start-from-scratch "Permalink to this heading")
First, install our SDK and CLI (ideally in a virtual environment):
python3 \-m venv venv
source venv/bin/activate
pip install steamship
Now copy this into `api.py`:
from steamship.invocable import post, PackageService
class MyPackage(PackageService):
@post("hello\_world")
def hello\_world(self, name: str \= None) \-> str:
return f"Hello, {name}"
## Next Steps[#](https://docs.steamship.com/#next-steps "Permalink to this heading")
**Using Packages**
Use full-stack language AI packages in your own code.
**Developing Packages**
Build and deploy packages with our low-code framework.
**Package Cookbook**
Package examples for common scenarios.
## Contents[#](https://docs.steamship.com/#contents "Permalink to this heading")
- [Configuration](https://docs.steamship.com/configuration/index.html)
- [Authentication](https://docs.steamship.com/configuration/authentication.html)
- [Steamship Configuration File](https://docs.steamship.com/configuration/authentication.html#steamship-configuration-file)
- [Using Multiple Profiles](https://docs.steamship.com/configuration/authentication.html#using-multiple-profiles)
- [Environment Variables](https://docs.steamship.com/configuration/authentication.html#environment-variables)
- [Client Libraries](https://docs.steamship.com/configuration/clients.html)
- [Python Client](https://docs.steamship.com/configuration/clients.html#python-client)
- [Typescript Client](https://docs.steamship.com/configuration/clients.html#typescript-client)
- [CLI](https://docs.steamship.com/configuration/cli.html)
- [HTTP API](https://docs.steamship.com/configuration/http.html)
- [Requests](https://docs.steamship.com/configuration/http.html#requests)
- [Optional Headers](https://docs.steamship.com/configuration/http.html#optional-headers)
- [Engine Response Format](https://docs.steamship.com/configuration/http.html#engine-response-format)
- [Creating a Package Instance](https://docs.steamship.com/configuration/http.html#creating-a-package-instance)
- [Invoking a Package Method](https://docs.steamship.com/configuration/http.html#invoking-a-package-method)
- [Packages](https://docs.steamship.com/packages/index.html)
- [Packages Table of Contents](https://docs.steamship.com/packages/index.html#packages-table-of-contents)
- [Using Packages](https://docs.steamship.com/packages/using.html)
- [Package FAQ](https://docs.steamship.com/packages/using.html#package-faq)
- [Developing Packages](https://docs.steamship.com/packages/developing/index.html)
- [Customizing your Package](https://docs.steamship.com/packages/developing/index.html#customizing-your-package)
- [Package Project Structure](https://docs.steamship.com/packages/developing/project-structure.html)
- [Package Cookbook](https://docs.steamship.com/packages/cookbook/index.html)
- [Working with Language](https://docs.steamship.com/packages/cookbook/index.html#working-with-language)
- [Building Packages](https://docs.steamship.com/packages/cookbook/index.html#building-packages)
- [Response Types](https://docs.steamship.com/packages/cookbook/index.html#response-types)
- [Plugins](https://docs.steamship.com/plugins/index.html)
- [File Importers](https://docs.steamship.com/plugins/index.html#file-importers)
- [Blockifiers](https://docs.steamship.com/plugins/index.html#blockifiers)
- [Taggers](https://docs.steamship.com/plugins/index.html#taggers)
- [Generators](https://docs.steamship.com/plugins/index.html#generators)
- [Embedders](https://docs.steamship.com/plugins/index.html#embedders)
- [Data](https://docs.steamship.com/data/index.html)
- [Workspaces](https://docs.steamship.com/data/workspaces.html)
- [Creating Workspaces](https://docs.steamship.com/data/workspaces.html#creating-workspaces)
- [Files](https://docs.steamship.com/data/files.html)
- [Creating Files Directly](https://docs.steamship.com/data/files.html#creating-files-directly)
- [Blocks](https://docs.steamship.com/data/blocks.html)
- [Creating Blocks](https://docs.steamship.com/data/blocks.html#id2)
- [Tags](https://docs.steamship.com/data/tags.html)
- [Ways to use Tags](https://docs.steamship.com/data/tags.html#ways-to-use-tags)
- [Tag Schemas](https://docs.steamship.com/data/tags.html#tag-schemas)
- [Block and File Tags](https://docs.steamship.com/data/tags.html#block-and-file-tags)
- [Querying Data](https://docs.steamship.com/data/queries/index.html)
- [Usage](https://docs.steamship.com/data/queries/index.html#usage)
- [Language Description](https://docs.steamship.com/data/queries/index.html#language-description)
- [Unary Predicates](https://docs.steamship.com/data/queries/index.html#unary-predicates)
- [Binary Predicates](https://docs.steamship.com/data/queries/index.html#binary-predicates)
- [Binary Relations](https://docs.steamship.com/data/queries/index.html#binary-relations)
- [Conjunctions](https://docs.steamship.com/data/queries/index.html#conjunctions)
- [Special Predicates](https://docs.steamship.com/data/queries/index.html#special-predicates)
- [Embedding Search Index](https://docs.steamship.com/embedding-search/index.html)
- [Inserting Data](https://docs.steamship.com/embedding-search/index.html#inserting-data)
- [Querying Data](https://docs.steamship.com/embedding-search/index.html#querying-data)
- [Developer Reference](https://docs.steamship.com/developing/index.html)
- [Cloning a Starter Project](https://docs.steamship.com/developing/project-creation.html)
- [The Steamship Manifest file](https://docs.steamship.com/developing/steamship-manifest.html)
- [Plugin Configuration](https://docs.steamship.com/developing/steamship-manifest.html#plugin-configuration)
- [Steamship Registry](https://docs.steamship.com/developing/steamship-manifest.html#steamship-registry)
- [Python Environment Setup](https://docs.steamship.com/developing/environment-setup.html)
- [Accepting Configuration](https://docs.steamship.com/developing/configuration.html)
- [Defining and Accepting configuration in your code](https://docs.steamship.com/developing/configuration.html#defining-and-accepting-configuration-in-your-code)
- [Storing Secrets](https://docs.steamship.com/developing/storing-secrets.html)
- [Writing Tests](https://docs.steamship.com/developing/testing.html)
- [Logging](https://docs.steamship.com/developing/testing.html#logging)
- [Throwing Errors](https://docs.steamship.com/developing/testing.html#throwing-errors)
- [Manual Testing](https://docs.steamship.com/developing/testing.html#manual-testing)
- [Automated testing](https://docs.steamship.com/developing/testing.html#automated-testing)
- [Automated testing setup](https://docs.steamship.com/developing/testing.html#automated-testing-setup)
- [Modifying or removing automated testing](https://docs.steamship.com/developing/testing.html#modifying-or-removing-automated-testing)
- [Deploying](https://docs.steamship.com/developing/deploying.html)
- [Deploying with the Steamship CLI](https://docs.steamship.com/developing/deploying.html#deploying-with-the-steamship-cli)
- [Deploying via GitHub Actions](https://docs.steamship.com/developing/deploying.html#deploying-via-github-actions)
- [Automated Deployment Setup](https://docs.steamship.com/developing/deploying.html#automated-deployment-setup)
- [Modifying or disabling automated deployments](https://docs.steamship.com/developing/deploying.html#modifying-or-disabling-automated-deployments)
- [Troubleshooting Deployments](https://docs.steamship.com/developing/deploying.html#troubleshooting-deployments)
- [The deployment fails because the version already exists](https://docs.steamship.com/developing/deploying.html#the-deployment-fails-because-the-version-already-exists)
- [The deployment fails because the tag does not match the manifest file](https://docs.steamship.com/developing/deploying.html#the-deployment-fails-because-the-tag-does-not-match-the-manifest-file)
- [The deployment fails with an authentication error](https://docs.steamship.com/developing/deploying.html#the-deployment-fails-with-an-authentication-error)
- [Updating your Web Listing](https://docs.steamship.com/developing/updating-web-listing.html)
- [Updating your Web Listing](https://docs.steamship.com/developing/updating-web-listing.html#updating-your-web-listing)
- [Adding taglines, demo links, and author icons](https://docs.steamship.com/developing/updating-web-listing.html#adding-taglines-demo-links-and-author-icons)
- [Python Client Reference](https://docs.steamship.com/api/modules.html)
- [steamship package](https://docs.steamship.com/api/steamship.html)
- [Subpackages](https://docs.steamship.com/api/steamship.html#subpackages)
- [steamship.base package](https://docs.steamship.com/api/steamship.base.html)
- [steamship.cli package](https://docs.steamship.com/api/steamship.cli.html)
- [steamship.client package](https://docs.steamship.com/api/steamship.client.html)
- [steamship.data package](https://docs.steamship.com/api/steamship.data.html)
- [steamship.experimental package](https://docs.steamship.com/api/steamship.experimental.html)
- [steamship.invocable package](https://docs.steamship.com/api/steamship.invocable.html)
- [steamship.plugin package](https://docs.steamship.com/api/steamship.plugin.html)
- [steamship.utils package](https://docs.steamship.com/api/steamship.utils.html)
- [Module contents](https://docs.steamship.com/api/steamship.html#module-steamship)
- [`Block`](https://docs.steamship.com/api/steamship.html#steamship.Block)
- [`Configuration`](https://docs.steamship.com/api/steamship.html#steamship.Configuration)
- [`DocTag`](https://docs.steamship.com/api/steamship.html#steamship.DocTag)
- [`EmbeddingIndex`](https://docs.steamship.com/api/steamship.html#steamship.EmbeddingIndex)
- [`File`](https://docs.steamship.com/api/steamship.html#steamship.File)
- [`MimeTypes`](https://docs.steamship.com/api/steamship.html#steamship.MimeTypes)
- [`Package`](https://docs.steamship.com/api/steamship.html#steamship.Package)
- [`PackageInstance`](https://docs.steamship.com/api/steamship.html#steamship.PackageInstance)
- [`PackageVersion`](https://docs.steamship.com/api/steamship.html#steamship.PackageVersion)
- [`PluginInstance`](https://docs.steamship.com/api/steamship.html#steamship.PluginInstance)
- [`PluginVersion`](https://docs.steamship.com/api/steamship.html#steamship.PluginVersion)
- [`RuntimeEnvironments`](https://docs.steamship.com/api/steamship.html#steamship.RuntimeEnvironments)
- [`Steamship`](https://docs.steamship.com/api/steamship.html#steamship.Steamship)
- [`SteamshipError`](https://docs.steamship.com/api/steamship.html#steamship.SteamshipError)
- [`Tag`](https://docs.steamship.com/api/steamship.html#steamship.Tag)
- [`Task`](https://docs.steamship.com/api/steamship.html#steamship.Task)
- [`TaskState`](https://docs.steamship.com/api/steamship.html#steamship.TaskState)
- [`Workspace`](https://docs.steamship.com/api/steamship.html#steamship.Workspace)
- [`check_environment()`](https://docs.steamship.com/api/steamship.html#steamship.check_environment)
- [License](https://docs.steamship.com/license.html)
- [Authors](https://docs.steamship.com/authors.html)
@@ -0,0 +1,330 @@
---
page-title: "Torantulino/Auto-GPT: An experimental open-source attempt to make GPT-4 fully autonomous."
url: https://github.com/Torantulino/Auto-GPT
date: "2023-04-14 17:06:34"
---
## Auto-GPT: An Autonomous GPT-4 Experiment
[![GitHub Repo stars](https://camo.githubusercontent.com/f86acaa79ffac59dbad1bf976872d731c4490b6bd5657f6ae338a41ed91bffae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f546f72616e74756c696e6f2f6175746f2d6770743f7374796c653d736f6369616c)](https://camo.githubusercontent.com/f86acaa79ffac59dbad1bf976872d731c4490b6bd5657f6ae338a41ed91bffae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f546f72616e74756c696e6f2f6175746f2d6770743f7374796c653d736f6369616c) [![Twitter Follow](https://camo.githubusercontent.com/3dec838512be04ad4896ffa2104efc742a69ffff26a6b546dcb8051ab8d31788/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f73696767726176697461733f7374796c653d736f6369616c)](https://twitter.com/SigGravitas) [![Discord Follow](https://camo.githubusercontent.com/99e48e4817c33e144d33faada1d11989fea6e189d98ed8da495497e01914ed67/68747470733a2f2f646362616467652e76657263656c2e6170702f6170692f7365727665722f6175746f6770743f7374796c653d666c6174)](https://discord.gg/autogpt) [![Unit Tests](https://github.com/Torantulino/Auto-GPT/actions/workflows/ci.yml/badge.svg)](https://github.com/Torantulino/Auto-GPT/actions/workflows/ci.yml)
Auto-GPT is an experimental open-source application showcasing the capabilities of the GPT-4 language model. This program, driven by GPT-4, chains together LLM "thoughts", to autonomously achieve whatever goal you set. As one of the first examples of GPT-4 running fully autonomously, Auto-GPT pushes the boundaries of what is possible with AI.
### Demo (30/03/2023):
## 💖 Help Fund Auto-GPT's Development 💖
If you can spare a coffee, you can help to cover the API costs of developing Auto-GPT and help push the boundaries of fully autonomous AI! A full day of development can easily cost as much as $20 in API costs, which for a free project is quite limiting. Your support is greatly appreciated
Development of this free, open-source project is made possible by all the [contributors](https://github.com/Torantulino/Auto-GPT/graphs/contributors) and [sponsors](https://github.com/sponsors/Torantulino). If you'd like to sponsor this project and have your avatar or company logo appear below [click here](https://github.com/sponsors/Torantulino).
### Individual Sponsors
[![robinicus](https://github.com/robinicus.png)](https://github.com/robinicus)  [![prompthero](https://github.com/prompthero.png)](https://github.com/prompthero)  [![crizzler](https://github.com/crizzler.png)](https://github.com/crizzler)  [![tob-le-rone](https://github.com/tob-le-rone.png)](https://github.com/tob-le-rone)  [![FSTatSBS](https://github.com/FSTatSBS.png)](https://github.com/FSTatSBS)  [![toverly1](https://github.com/toverly1.png)](https://github.com/toverly1)  [![ddtarazona](https://github.com/ddtarazona.png)](https://github.com/ddtarazona)  [![Nalhos](https://github.com/Nalhos.png)](https://github.com/Nalhos)  [![Kazamario](https://github.com/Kazamario.png)](https://github.com/Kazamario)  [![pingbotan](https://github.com/pingbotan.png)](https://github.com/pingbotan)  [![indoor47](https://github.com/indoor47.png)](https://github.com/indoor47)  [![AuroraHolding](https://github.com/AuroraHolding.png)](https://github.com/AuroraHolding)  [![kreativai](https://github.com/kreativai.png)](https://github.com/kreativai)  [![hunteraraujo](https://github.com/hunteraraujo.png)](https://github.com/hunteraraujo)  [![Explorergt92](https://github.com/Explorergt92.png)](https://github.com/Explorergt92)  [![judegomila](https://github.com/judegomila.png)](https://github.com/judegomila)   [![thepok](https://github.com/thepok.png)](https://github.com/thepok)   [![SpacingLily](https://github.com/SpacingLily.png)](https://github.com/SpacingLily)  [![merwanehamadi](https://github.com/merwanehamadi.png)](https://github.com/merwanehamadi)  [![m](https://github.com/m.png)](https://github.com/m)  [![zkonduit](https://github.com/zkonduit.png)](https://github.com/zkonduit)  [![maxxflyer](https://github.com/maxxflyer.png)](https://github.com/maxxflyer)  [![tekelsey](https://github.com/tekelsey.png)](https://github.com/tekelsey)  [![digisomni](https://github.com/digisomni.png)](https://github.com/digisomni)  [![nocodeclarity](https://github.com/nocodeclarity.png)](https://github.com/nocodeclarity)  [![tjarmain](https://github.com/tjarmain.png)](https://github.com/tjarmain)
## Table of Contents
- [Auto-GPT: An Autonomous GPT-4 Experiment](https://github.com/Torantulino/Auto-GPT#auto-gpt-an-autonomous-gpt-4-experiment)
- [Demo (30/03/2023):](https://github.com/Torantulino/Auto-GPT#demo-30032023)
- [Table of Contents](https://github.com/Torantulino/Auto-GPT#table-of-contents)
- [🚀 Features](https://github.com/Torantulino/Auto-GPT#-features)
- [📋 Requirements](https://github.com/Torantulino/Auto-GPT#-requirements)
- [💾 Installation](https://github.com/Torantulino/Auto-GPT#-installation)
- [🔧 Usage](https://github.com/Torantulino/Auto-GPT#-usage)
- [Logs](https://github.com/Torantulino/Auto-GPT#logs)
- [🗣️ Speech Mode](https://github.com/Torantulino/Auto-GPT#%EF%B8%8F-speech-mode)
- [🔍 Google API Keys Configuration](https://github.com/Torantulino/Auto-GPT#-google-api-keys-configuration)
- [Setting up environment variables](https://github.com/Torantulino/Auto-GPT#setting-up-environment-variables)
- [Redis Setup](https://github.com/Torantulino/Auto-GPT#redis-setup)
- [🌲 Pinecone API Key Setup](https://github.com/Torantulino/Auto-GPT#-pinecone-api-key-setup)
- [Setting up environment variables](https://github.com/Torantulino/Auto-GPT#setting-up-environment-variables-1)
- [Setting Your Cache Type](https://github.com/Torantulino/Auto-GPT#setting-your-cache-type)
- [View Memory Usage](https://github.com/Torantulino/Auto-GPT#view-memory-usage)
- [💀 Continuous Mode ⚠️](https://github.com/Torantulino/Auto-GPT#-continuous-mode-%EF%B8%8F)
- [GPT3.5 ONLY Mode](https://github.com/Torantulino/Auto-GPT#gpt35-only-mode)
- [🖼 Image Generation](https://github.com/Torantulino/Auto-GPT#-image-generation)
- [⚠️ Limitations](https://github.com/Torantulino/Auto-GPT#%EF%B8%8F-limitations)
- [🛡 Disclaimer](https://github.com/Torantulino/Auto-GPT#-disclaimer)
- [🐦 Connect with Us on Twitter](https://github.com/Torantulino/Auto-GPT#-connect-with-us-on-twitter)
- [Run tests](https://github.com/Torantulino/Auto-GPT#run-tests)
- [Run linter](https://github.com/Torantulino/Auto-GPT#run-linter)
## 🚀 Features
- 🌐 Internet access for searches and information gathering
- 💾 Long-Term and Short-Term memory management
- 🧠 GPT-4 instances for text generation
- 🔗 Access to popular websites and platforms
- 🗃️ File storage and summarization with GPT-3.5
## 📋 Requirements
- environments(just choose one)
- [vscode + devcontainer](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers): It has been configured in the .devcontainer folder and can be used directly
- [Python 3.8 or later](https://www.tutorialspoint.com/how-to-install-python-in-windows)
- [OpenAI API key](https://platform.openai.com/account/api-keys)
- [PINECONE API key](https://www.pinecone.io/)
Optional:
- [ElevenLabs Key](https://elevenlabs.io/) (If you want the AI to speak)
## 💾 Installation
To install Auto-GPT, follow these steps:
1. Make sure you have all the **requirements** above, if not, install/get them.
*The following commands should be executed in a CMD, Bash or Powershell window. To do this, go to a folder on your computer, click in the folder path at the top and type CMD, then press enter.*
2. Clone the repository: For this step you need Git installed, but you can just download the zip file instead by clicking the button at the top of this page ☝️
```
git clone https://github.com/Torantulino/Auto-GPT.git
```
3. Navigate to the project directory: *(Type this into your CMD window, you're aiming to navigate the CMD window to the repository you just downloaded)*
4. Install the required dependencies: *(Again, type this into your CMD window)*
```
pip install -r requirements.txt
```
5. Rename `.env.template` to `.env` and fill in your `OPENAI_API_KEY`. If you plan to use Speech Mode, fill in your `ELEVEN_LABS_API_KEY` as well.
- Obtain your OpenAI API key from: [https://platform.openai.com/account/api-keys](https://platform.openai.com/account/api-keys).
- Obtain your ElevenLabs API key from: [https://elevenlabs.io](https://elevenlabs.io/). You can view your xi-api-key using the "Profile" tab on the website.
- If you want to use GPT on an Azure instance, set `USE_AZURE` to `True` and then:
- Rename `azure.yaml.template` to `azure.yaml` and provide the relevant `azure_api_base`, `azure_api_version` and all of the deployment ids for the relevant models in the `azure_model_map` section:
- `fast_llm_model_deployment_id` - your gpt-3.5-turbo or gpt-4 deployment id
- `smart_llm_model_deployment_id` - your gpt-4 deployment id
- `embedding_model_deployment_id` - your text-embedding-ada-002 v2 deployment id
- Please specify all of these values as double quoted strings
- details can be found here: [https://pypi.org/project/openai/](https://pypi.org/project/openai/) in the `Microsoft Azure Endpoints` section and here: [https://learn.microsoft.com/en-us/azure/cognitive-services/openai/tutorials/embeddings?tabs=command-line](https://learn.microsoft.com/en-us/azure/cognitive-services/openai/tutorials/embeddings?tabs=command-line) for the embedding model.
## 🔧 Usage
1. Run the `main.py` Python script in your terminal: *(Type this into your CMD window)*
2. After each of AUTO-GPT's actions, type "NEXT COMMAND" to authorise them to continue.
3. To exit the program, type "exit" and press Enter.
### Logs
You will find activity and error logs in the folder `./output/logs`
To output debug logs:
```
python scripts/main.py --debug
```
## 🗣️ Speech Mode
Use this to use TTS for Auto-GPT
```
python scripts/main.py --speak
```
## 🔍 Google API Keys Configuration
This section is optional, use the official google api if you are having issues with error 429 when running a google search. To use the `google_official_search` command, you need to set up your Google API keys in your environment variables.
1. Go to the [Google Cloud Console](https://console.cloud.google.com/).
2. If you don't already have an account, create one and log in.
3. Create a new project by clicking on the "Select a Project" dropdown at the top of the page and clicking "New Project". Give it a name and click "Create".
4. Go to the [APIs & Services Dashboard](https://console.cloud.google.com/apis/dashboard) and click "Enable APIs and Services". Search for "Custom Search API" and click on it, then click "Enable".
5. Go to the [Credentials](https://console.cloud.google.com/apis/credentials) page and click "Create Credentials". Choose "API Key".
6. Copy the API key and set it as an environment variable named `GOOGLE_API_KEY` on your machine. See setting up environment variables below.
7. [Enable](https://console.developers.google.com/apis/api/customsearch.googleapis.com) the Custom Search API on your project. (Might need to wait few minutes to propagate)
8. Go to the [Custom Search Engine](https://cse.google.com/cse/all) page and click "Add".
9. Set up your search engine by following the prompts. You can choose to search the entire web or specific sites.
10. Once you've created your search engine, click on "Control Panel" and then "Basics". Copy the "Search engine ID" and set it as an environment variable named `CUSTOM_SEARCH_ENGINE_ID` on your machine. See setting up environment variables below.
*Remember that your free daily custom search quota allows only up to 100 searches. To increase this limit, you need to assign a billing account to the project to profit from up to 10K daily searches.*
### Setting up environment variables
For Windows Users:
```
setx GOOGLE_API_KEY "YOUR_GOOGLE_API_KEY"
setx CUSTOM_SEARCH_ENGINE_ID "YOUR_CUSTOM_SEARCH_ENGINE_ID"
```
For macOS and Linux users:
```
export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"
export CUSTOM_SEARCH_ENGINE_ID="YOUR_CUSTOM_SEARCH_ENGINE_ID"
```
## Redis Setup
Install docker desktop.
Run:
```
docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest
```
See [https://hub.docker.com/r/redis/redis-stack-server](https://hub.docker.com/r/redis/redis-stack-server) for setting a password and additional configuration.
Set the following environment variables:
```
MEMORY_BACKEND=redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
```
Note that this is not intended to be run facing the internet and is not secure, do not expose redis to the internet without a password or at all really.
You can optionally set
```
WIPE_REDIS_ON_START=False
```
To persist memory stored in Redis.
You can specify the memory index for redis using the following:
## 🌲 Pinecone API Key Setup
Pinecone enables the storage of vast amounts of vector-based memory, allowing for only relevant memories to be loaded for the agent at any given time.
1. Go to [pinecone](https://app.pinecone.io/) and make an account if you don't already have one.
2. Choose the `Starter` plan to avoid being charged.
3. Find your API key and region under the default project in the left sidebar.
### Setting up environment variables
Simply set them in the `.env` file.
Alternatively, you can set them from the command line (advanced):
For Windows Users:
```
setx PINECONE_API_KEY "YOUR_PINECONE_API_KEY"
setx PINECONE_ENV "Your pinecone region" # something like: us-east4-gcp
```
For macOS and Linux users:
```
export PINECONE_API_KEY="YOUR_PINECONE_API_KEY"
export PINECONE_ENV="Your pinecone region" # something like: us-east4-gcp
```
## Setting Your Cache Type
By default Auto-GPT is going to use LocalCache instead of redis or Pinecone.
To switch to either, change the `MEMORY_BACKEND` env variable to the value that you want:
`local` (default) uses a local JSON cache file `pinecone` uses the Pinecone.io account you configured in your ENV settings `redis` will use the redis cache that you configured
## View Memory Usage
1. View memory usage by using the `--debug` flag :)
## 💀 Continuous Mode ⚠️
Run the AI **without** user authorisation, 100% automated. Continuous mode is not recommended. It is potentially dangerous and may cause your AI to run forever or carry out actions you would not usually authorise. Use at your own risk.
1. Run the `main.py` Python script in your terminal:
```
python scripts/main.py --continuous
```
2. To exit the program, press Ctrl + C
## GPT3.5 ONLY Mode
If you don't have access to the GPT4 api, this mode will allow you to use Auto-GPT!
```
python scripts/main.py --gpt3only
```
It is recommended to use a virtual machine for tasks that require high security measures to prevent any potential harm to the main computer's system and data.
## 🖼 Image Generation
By default, Auto-GPT uses DALL-e for image generation. To use Stable Diffusion, a [HuggingFace API Token](https://huggingface.co/settings/tokens) is required.
Once you have a token, set these variables in your `.env`:
```
IMAGE_PROVIDER=sd
HUGGINGFACE_API_TOKEN="YOUR_HUGGINGFACE_API_TOKEN"
```
## ⚠️ Limitations
This experiment aims to showcase the potential of GPT-4 but comes with some limitations:
1. Not a polished application or product, just an experiment
2. May not perform well in complex, real-world business scenarios. In fact, if it actually does, please share your results!
3. Quite expensive to run, so set and monitor your API key limits with OpenAI!
## 🛡 Disclaimer
Disclaimer This project, Auto-GPT, is an experimental application and is provided "as-is" without any warranty, express or implied. By using this software, you agree to assume all risks associated with its use, including but not limited to data loss, system failure, or any other issues that may arise.
The developers and contributors of this project do not accept any responsibility or liability for any losses, damages, or other consequences that may occur as a result of using this software. You are solely responsible for any decisions and actions taken based on the information provided by Auto-GPT.
**Please note that the use of the GPT-4 language model can be expensive due to its token usage.** By utilizing this project, you acknowledge that you are responsible for monitoring and managing your own token usage and the associated costs. It is highly recommended to check your OpenAI API usage regularly and set up any necessary limits or alerts to prevent unexpected charges.
As an autonomous experiment, Auto-GPT may generate content or take actions that are not in line with real-world business practices or legal requirements. It is your responsibility to ensure that any actions or decisions made based on the output of this software comply with all applicable laws, regulations, and ethical standards. The developers and contributors of this project shall not be held responsible for any consequences arising from the use of this software.
By using Auto-GPT, you agree to indemnify, defend, and hold harmless the developers, contributors, and any affiliated parties from and against any and all claims, damages, losses, liabilities, costs, and expenses (including reasonable attorneys' fees) arising from your use of this software or your violation of these terms.
## 🐦 Connect with Us on Twitter
Stay up-to-date with the latest news, updates, and insights about Auto-GPT by following our Twitter accounts. Engage with the developer and the AI's own account for interesting discussions, project updates, and more.
- **Developer**: Follow [@siggravitas](https://twitter.com/siggravitas) for insights into the development process, project updates, and related topics from the creator of Entrepreneur-GPT.
- **Entrepreneur-GPT**: Join the conversation with the AI itself by following [@En\_GPT](https://twitter.com/En_GPT). Share your experiences, discuss the AI's outputs, and engage with the growing community of users.
We look forward to connecting with you and hearing your thoughts, ideas, and experiences with Auto-GPT. Join us on Twitter and let's explore the future of AI together!
[![Star History Chart](https://camo.githubusercontent.com/8226dd8023ed52d438c66791ae849051fa7c8e1f874bb728ca9b2c3dbb1cd64b/68747470733a2f2f6170692e737461722d686973746f72792e636f6d2f7376673f7265706f733d546f72616e74756c696e6f2f6175746f2d67707426747970653d44617465)](https://star-history.com/#Torantulino/auto-gpt&Date)
## Run tests
To run tests, run the following command:
```
python -m unittest discover tests
```
To run tests and see coverage, run the following command:
```
coverage run -m unittest discover tests
```
## Run linter
This project uses [flake8](https://flake8.pycqa.org/en/latest/) for linting. We currently use the following rules: `E303,W293,W291,W292,E305,E231,E302`. See the [flake8 rules](https://www.flake8rules.com/) for more information.
To run the linter, run the following command:
```
flake8 scripts/ tests/
# Or, if you want to run flake8 with the same configuration as the CI:
flake8 scripts/ tests/ --select E303,W293,W291,W292,E305,E231,E302
```
@@ -0,0 +1,167 @@
---
page-title: "Usage of matrix-bot-sdk | Matrix.org"
url: https://matrix.org/docs/guides/usage-of-matrix-bot-sdk
date: "2023-04-18 13:34:11"
---
This article concerns [matrix-bot-sdk](https://github.com/turt2live/matrix-bot-sdk), a TypeScript client SDK for Matrix. We'll build a simple "echo bot", meaning a bot which replies to messages with the text it has just read.
Note that although the SDK is written in TypeScript, we'll use JavaScript in our examples. If you'd prefer to use TypeScript, then do!
## [](https://matrix.org/docs/guides/usage-of-matrix-bot-sdk#setup)Setup
Let's make a new folder, and import our only npm dependency. The following examples are all meant to be run in a bash terminal.
```
mkdir matrix-js-echo-bot
cd matrix-js-echo-bot
npm install matrix-bot-sdk
```
Create a new file named "index.js", and let's get started.
## [](https://matrix.org/docs/guides/usage-of-matrix-bot-sdk#instantiation)Instantiation
In our js file, start by importing the minimum we'll need for this example:
```
const sdk = require("matrix-bot-sdk");
const MatrixClient = sdk.MatrixClient;
const SimpleFsStorageProvider = sdk.SimpleFsStorageProvider;
const AutojoinRoomsMixin = sdk.AutojoinRoomsMixin;
```
Create a new account for your bot on a homeserver, then get the `access_token`. The simplest way to do this is using Element, [take a look at these instructions](https://t2bot.io/docs/access_tokens/). Set some variables to store the homeserver and `access_token`. This is all the authentication you need!
```
const homeserverUrl = "https://matrix.org"; // make sure to update this with your url
const accessToken = "YourSecretAccessToken";
```
Now we'll configure a storage provider - matrix-bot-sdk provides the `SimpleFsStorageProvider`, which is ideal for most cases:
```
const storage = new SimpleFsStorageProvider("bot.json");
```
When the bot starts, the SDK will create a a new file called "bot.json" to store the data it needs.
Finally we're ready to start the client! As you'd expect, we'll use the variables we've already specified.
```
const client = new MatrixClient(homeserverUrl, accessToken, storage);
```
There is one more thing we need to do. We'll include a mixin which instructs the bot to auto-accept any room invite it receives. This makes testing much more convenient.
```
AutojoinRoomsMixin.setupOnClient(client);
```
Finally, let's start the Client:
```
client.start().then(() => console.log("Client started!"));
```
If you're keeping up, your code should look something like:
```
import {
MatrixClient,
SimpleFsStorageProvider,
AutojoinRoomsMixin
} from "matrix-bot-sdk";
const homeserverUrl = "https://matrix.org"; // make sure to update this with your url
const accessToken = "YourSecretAccessToken";
const storage = new SimpleFsStorageProvider("bot.json");
const client = new MatrixClient(homeserverUrl, accessToken, storage);
AutojoinRoomsMixin.setupOnClient(client);
client.start().then(() => console.log("Client started!"));
```
Let's run it:
This should now join and sit idle, but join any room you invite the bot to.
## [](https://matrix.org/docs/guides/usage-of-matrix-bot-sdk#sync-loop)/sync loop
Right now, while it's just listening to invites and nothing else, what is the bot actually doing? It's calling the `/sync` endpoint in a loop. Calling this endpoint returns all new events since some previous point.
Leave the script running and open `bot.json`, which is the file we specified for storage. This file contains a field `syncToken`, which is being occasionally updated - the SDK uses this field to give a token to the homeserver, which uses it to know which events to send back.
## [](https://matrix.org/docs/guides/usage-of-matrix-bot-sdk#receiving-and-sending-events)Receiving and Sending events
In order to echo messages, our bot must first be able to read them. The `client.on()` method of our MatrixClient takes two arguments: one for the event type, one for a callback to handle the event:
```
client.on("room.message", (roomId, event) => {
if (! event["content"]) return;
const sender = event["sender"];
const body = event["content"]["body"];
console.log(`${roomId}: ${sender} says '${body}`);
});
```
In this way we can inspect an the contents of an event and render them. We choose to exit early in the case that `event["content"]` is empty because this will usually mean the message was redacted.
To send a message, we use the `client.sendMessage()` method. This takes two arguments: the roomId, and a JSON object containing the contents of the message to send, for example:
```
client.sendMessage(roomId, {
"msgtype": "m.text",
"body": "This is message text.",
});
```
Note, it's also possible to use `client.sendText()` to achieve the same result, as in
```
client.sendText(roomId, "This is message text.")
```
The reason for showing `client.sendMessage()` is to make it clear that the message format is [just the same as you'd find in the spec](https://matrix.org/docs/spec/client_server/latest#put-matrix-client-r0-rooms-roomid-send-eventtype-txnid).
## [](https://matrix.org/docs/guides/usage-of-matrix-bot-sdk#implementing-echobot-functionality)Implementing echobot functionality
To work, an echobot needs only to listen for incoming messages, read the message text, and use it to reply. Let's demonstrate that now.
- Read the message as in the example above
- Inspect the body text, if it starts with "!echo", send back the remaining text
- Strip out the "!echo" tag
- Send a message containing the result
```
client.on("room.message", (roomId, event) => {
if (! event["content"]) return;
const sender = event["sender"];
const body = event["content"]["body"];
console.log(`${roomId}: ${sender} says '${body}`);
if (body.startsWith("!echo")) {
const replyText = body.substring("!echo".length).trim();
client.sendMessage(roomId, {
"msgtype": "m.notice",
"body": replyText,
});
}
});
```
## [](https://matrix.org/docs/guides/usage-of-matrix-bot-sdk#conclusion)Conclusion
It's extremely simple to listen to messages with [matrix-bot-sdk](https://github.com/turt2live/matrix-bot-sdk) create an echobot! There are many more features, you can see the MatrixClient class is [very well documented](https://github.com/turt2live/matrix-bot-sdk/blob/master/src/MatrixClient.ts). Next in this series, we'll explore Rich Replies, and take a look at the kick and ban functions for room administration.
## [](https://matrix.org/docs/guides/usage-of-matrix-bot-sdk#ps-use-typescript)PS, use TypeScript
This SDK uses TypeScript, which provides a lot of benefits. In this example, we used JavaScript, but it's just as easy to use TypeScript and maybe preferable, since it is the language [matrix-bot-sdk](https://github.com/turt2live/matrix-bot-sdk) is written in.
First let's install `tsc`, which compiles from TypeScript to JavaScript:
Now, start tsc in watch-mode (`-w`), and leave it to compile our code:
Now, whenever we create a new TypeScript (`.ts`) file, it will be automatically watched and compiled to JavaScript.
When you have your .js file(s), you can run them with `node <filename>` as normal.
@@ -0,0 +1,410 @@
---
page-title: "Using Let's Encrypt for internal servers - Philipp's Tech Blog"
url: https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/
date: "2023-04-06 08:52:23"
---
![](https://d3u5jkmuxaiujc.cloudfront.net/wp-content/uploads/2015/12/9289019-150x150.png)
[Lets Encrypt](https://letsencrypt.org/) is a revolutionary new certificate authority that provides free certificates in a completely automated process. These certificates are issued via the [ACME protocol](https://ietf-wg-acme.github.io/acme/draft-ietf-acme-acme.html). Over the last 2 years or so, the Internet has widely adopted Lets Encrypt — over 50% of the webs SSL/TLS certificates are now issued by Lets Encrypt.
But while there are many tools to automatically renew certificates for publicly available webservers ([certbot](https://certbot.eff.org/), [simp\_le](https://github.com/kuba/simp_le), [I wrote about how to do that 3 years back](https://blog.heckel.xyz/2015/12/04/lets-encrypt-5-min-guide-to-set-up-cronjob-based-certificate-renewal/)), its hard to find any useful information about how to issue certificates for internal non Internet facing servers and/or devices with Lets Encrypt.
This blog posts describes **how to issue Lets Encrypt certificates for internal servers**. At my work, we issued a certificate for each of our 65,000 90,000+ BCDR appliances using this exact mechanism.
---
**Content**
1. [1\. How does it work?](https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/#How-does-it-work)
2. [2\. Example: An internal server 10.1.1.4, aka. xi8qz.example.com](https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/#Example-An-internal-server-10-1-1-4-aka-xi8qz-example-com)
1. [2.1. Prerequisites: Assigning a domain for each machine (steps 1-3)](https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/#Prerequisites-Assigning-a-domain-for-each-machine-steps-1-3)
2. [2.2. Requesting a certificate (steps 4-14)](https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/#Requesting-a-certificate-steps-4-14)
3. [3\. Deployment considerations: Lets Encrypt rate limits](https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/#Deployment-considerations-Let-s-Encrypt-rate-limits)
---
**Hello Hacker News,** first time on the HN front page! I feel honored, yeyy! I responded to all of the concerns in the [comments section](https://news.ycombinator.com/item?id=19353294).
**If youre looking for an implementation of this idea,** you may find [localtls](https://github.com/Corollarium/localtls) interesting. I have not tested it myself, but it seems to do similar things to what I am describing here.
---
### 1\. How does it work? [](https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/#How-does-it-work)
To issue a certificate through Lets Encrypt, you must prove that you either own the website you want to issue the certificate for, or that you own the domain it runs on. Typically, automated tools like [certbot](https://certbot.eff.org/) use the [HTTP challenge](https://ietf-wg-acme.github.io/acme/draft-ietf-acme-acme.html#rfc.section.8.3) to prove site ownership using the .well-known directory. While this works beautifully if the site is Internet-facing (and Lets Encrypt can verify the HTTP challenge files via a simple HTTP request), it doesnt work if your server runs on 10.1.1.4 or any other internal address.
The [DNS challenge](https://ietf-wg-acme.github.io/acme/draft-ietf-acme-acme.html#rfc.section.8.4) solves this problem by letting you prove domain ownership through the DNS TXT record \_acme-challenge.example.com. Lets Encrypt will verify that the record matches what it expects and issue your certificate if it all adds up.
So really the magic ingredients to issuing certificates for internal non Internet facing machines are:
- A dedicated DNS zone for all your internal devices, e.g. xi8qz.example.com, and a dynamic DNS server to manage this zone (here: example.com)
- An ACME client capable of using the Lets Encrypts DNS challenge to prove domain ownership
Advertisement
### 2\. Example: An internal server 10.1.1.4, aka. xi8qz.example.com [](https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/#Example-An-internal-server-10-1-1-4-aka-xi8qz-example-com)
The following diagram shows how we have implemented our Lets Encrypt integration for our backup appliances. Each appliance (read: internal server) is behind a NAT and carries its own local IP address.
The general approach is simple: The appliance regularly reaches out to our control server to ensure that it can be reached via its own subdomain. If its local IP address changes, it triggers an update of its own subdomain. In addition, it checks regularly if the certificate is still valid, and requests a renewal if its outdated.
Heres a bit more detail to this process:
![](https://blog.heckel.xyz/wp-content/uploads/2018/07/LetsEncryptBlogPost-1-1024x837.png)
For this example, lets assume were trying to issue a certificate for an appliance with the identifier xi8qz and the local IP address 10.1.1.4. From the perspective of this appliance, there are two requests to be made:
- **Steps 1-3:** First, it needs to set/update its own DNS domain (here: xi8qz.example.com). This domain will later be used as a common name (CN) in the certificate. On top of that, it needs to make sure that this record is updated every time the servers IP address changes.
- **Steps 4-14:** It needs to regularly check if the local certificate needs to be renewed and request a renewal if its time. Obviously, if there is no certificate it needs to be “renewed”.
Lets now examine these steps in greater detail.
#### 2.1. Prerequisites: Assigning a domain for each machine (steps 1-3) [](https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/#Prerequisites-Assigning-a-domain-for-each-machine-steps-1-3)
As mentioned above, we need to give each appliance a proper domain name in order to be able to prove ownership to Lets Encrypt, so we need to buy a domain (here: example.com) and delegate its NS records to our DDNS server:
$ dig +short NS example.com
ddns1.mycompany.com.
On top of that, we need the ability to dynamically add and remove records from it (via an API of some sort). Ive previously written about how to [spin up your own DDNS server](https://blog.heckel.xyz/2016/12/31/your-own-dynamic-dns-server-powerdns-mysql/), if you are interested.
Once thats all set up, we need to make sure that the machines A record is updated whenever its IP address changes. For our internal machine, lets assign xi8qz.example.com as its domain. If everythings working properly, you should be able to resolve this domain to its IP address using a normal DNS query:
$ dig +short xi8qz.example.com
10.1.1.4
#### 2.2. Requesting a certificate (steps 4-14) [](https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/#Requesting-a-certificate-steps-4-14)
Assuming you now control the DNS zone for example.com completely and you can quickly edit it dynamically, youre all set for actually issuing certificates for your local device domain via Lets Encrypt.
For our example appliance, it will regularly check if the existing certificate is still valid (step 4). If there is no certificate or the existing one is about to expire, the device will generate a keypair and a [certificate signing request (CSR)](https://en.wikipedia.org/wiki/Certificate_signing_request) using its assigned hostname (here: xi8qz.example.com) as a CN, and itll send that CSR to the control server (step 5).
After authorizing the request (an important step not shown in the diagram!), the control server requests a DNS challenge for the given domain from the ACME API via the [Pre-Authorization](https://ietf-wg-acme.github.io/acme/draft-ietf-acme-acme.html#rfc.section.7.4.1)/new-authz API call (step 6). The ACME API responds with a DNS challenge (step 7). If all goes well, this looks something like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "identifier": {
    "type": "dns",
    "value": "xi8qz.example.com"
  },
  "status": "pending",
  "expires": "2018-04-15T21:26:29Z",
  "challenges": \[
    {
      "type": "dns-01",
      "status": "pending",
      "uri": "https://acme-staging.api.letsencrypt.org/acme/challenge/VtjihR4X8nLAj4MDwI...",
      "token": "aLptEKAeUOajkiGrx-kkbjUX4b1MC..."
    },
    // ...
  \],
  // ...
}
Using this response, the control server must set a DNS TXT record at \_acme-challenge.xi8qz.example.com (step 8) and notify the ACME API that the challenge response has been placed (step 9).
Once the challenge response has been verified by Lets Encrypt (step 10-11), the certificate can finally be requested using the CSR (step 12-13).
After Lets Encrypt responds with a certificate, youll see something like this on the wire:
\--\--\-BEGIN CERTIFICATE\--\--\-
MIIGEjCCBPqgAwIBAgISAyk2izMz7OXSqHeZhg+rUR5uMA0GCSqGSIb3DQEBCwUA
MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD
...
If decoded with openssl, we can see thats its the real deal:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$ openssl x509 \-in www.crt \-text \-noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            03:29:36:8b:33:33:ec:e5:d2:a8:77:99:86:0f:ab:51:1e:6e
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: C\=US, O\=Let's Encrypt, CN=Let's Encrypt Authority X3
        Validity
            Not Before: Jul 18 23:37:35 2018 GMT
            Not After : Oct 16 23:37:35 2018 GMT
        Subject: CN\=xi8qz.example.com
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public\-Key: (2048 bit)
                Modulus:
                    00:be:69:df:28:04:9c:2b:e9:94:72:c3:de:a6:fd:
                    a4:38:93:be:43:a7:81:8b:dc:9a:be:19:0d:c0:d1:
...
This certificate is then returned to the machine (step 14). After the webserver of the appliance/server has been restarted, its web interface can be accessed via HTTPS in the browser or on the command line:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
$ curl \-v https://xi8qz.example.com/login
\*   Trying 10.1.1.4...
\* TCP\_NODELAY set
\* Connected to xi8qz.example.com (10.1.1.4) port 443 (#0)
\* ALPN, offering h2
\* ALPN, offering http/1.1
\* successfully set certificate verify locations:
\*   CAfile: /etc/ssl/certs/ca\-certificates.crt
  CApath: /etc/ssl/certs
\* TLSv1.2 (OUT), TLS handshake, Client hello (1):
\* TLSv1.2 (IN), TLS handshake, Server hello (2):
\* TLSv1.2 (IN), TLS handshake, Certificate (11):
\* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
\* TLSv1.2 (IN), TLS handshake, Server finished (14):
\* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
\* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
\* TLSv1.2 (OUT), TLS handshake, Finished (20):
\* TLSv1.2 (IN), TLS handshake, Finished (20):
\* SSL connection using TLSv1.2 / ECDHE\-RSA\-AES256\-GCM\-SHA384
\* ALPN, server accepted to use http/1.1
\* Server certificate:
\*  subject: CN\=xi8qz.example.com
\*  start date: Jul 18 23:37:35 2018 GMT
\*  expire date: Oct 16 23:37:35 2018 GMT
\*  subjectAltName: host "xi8qz.example.com" matched cert's "xi8qz.example.com"
\*  issuer: C=US; O=Let's Encrypt; CN\=Let's Encrypt Authority X3
\*  SSL certificate verify ok.
\> GET /login HTTP/1.1
\> Host: xi8qz.example.com
\> User\-Agent: curl/7.58.0
\> Accept: \*/\*
\>
< HTTP/1.1 200 OK
< Date: Sun, 05 Aug 2018 17:38:49 GMT
< Server: Apache/2.4.18 (Ubuntu)
...
### 3\. Deployment considerations: Lets Encrypt rate limits [](https://blog.heckel.io/2018/08/05/issuing-lets-encrypt-certificates-for-65000-internal-servers/#Deployment-considerations-Let-s-Encrypt-rate-limits)
Its important to note that if you are considering implementing this mechanism for a large number of servers that you use the Lets Encrypt [staging environments](https://letsencrypt.org/docs/staging-environment/) for testing and, more importantly, that you consider their [rate limit restrictions](https://letsencrypt.org/docs/rate-limits/).
By default, Lets Encrypt only allows you to issue 20 certificates per week for the same domain or the same account. To increase this number, you have to either [request a higher rate limit](https://goo.gl/forms/plqRgFVnZbdGhE9n1) or get your domain added to the [public suffix list](https://publicsuffix.org/) (note: adding your domain here has other implications!).
Due to these rate limits, it is vital that you spread out the initial deployment enough to stay under the rate limit, and that you leave enough room for future servers to be added. Also consider renewals in the initial rollout plan.
### 4\. Summary
As you can see its not really rocket science.
We first assigned each appliance (aka. internal server) a public domain name using our own dynamic DNS server and a dedicated DNS zone. Using the servers assigned domain (here: xi8qz.example.com), we then used Lets Encrypts free certificate offering and their DNS challenge to issue a certificate for that server.
By doing that for all internal servers, we can provide secure communication in our internal IT infrastructure without having to deploy a custom CA cert or having to pay for certificates.
@@ -0,0 +1,208 @@
---
page-title: "What is Prompt Engineering? | prmpts.AI"
url: https://prmpts.ai/blog/what-is-prompt-engineering
date: "2023-04-23 12:41:07"
---
> What is Prompt Engineering?
---
Blog
What is Prompt Engineering?
2023-01-24 ·
8 minute read
Large language models like GPT-3 have spawned a new emerging field called Prompt Engineering. People are coming up with clever techniques to prompt these models to perform different tasks, such as:
- TL;DR summarization
- Fix grammar/spelling errors
- Explain a concept to a 5 year old
- Generate code using natural language
- Explain what a piece of code does
- Generate stories
- Q&A
These are just a couple of examples among millions of possible use cases. The exciting thing about Prompt Engineering is that the possibilities are endless.
## [](https://prmpts.ai/blog/what-is-prompt-engineering#so-what-is-prompt-engineering-exactly)So what is Prompt Engineering exactly?
Prompt Engineering is the practice of producing robust prompts for generative language models that can withstand a number of real world challenges:
- How do we craft a prompt to produce a specific result?
- How do we test our prompts to know that they consistently produce the right results?
- How do we trust the language model not to say something incorrect/inappropriate?
- How do we prevent prompt injection?
- How do we pass in a custom data set or knowledge base?
- What do we do if our prompt doesn't fit within the model's token limits?
- How do we estimate cost per prompt when inputs are unknown?
- How do we compare competing language models as more become available?
As a Prompt Engineer, your job is to take the general capabilities of large language models and narrow them to a specific use case. You are responsible for addressing the above challenges and following best practices to accommodate them.
In this post we will explore the anatomy of a prompt, break down an example prompt, discuss best practices when designing prompts, and answer some common questions about Prompt Engineering.
## [](https://prmpts.ai/blog/what-is-prompt-engineering#anatomy-of-a-prompt)Anatomy of a prompt
Prompts are fundamentally made of 3 parts:
- **Static template:** This is the text template that structures the prompt's context, task, and input placeholders. This part of the prompt doesn't change between executions.
- **Dynamic inputs:** This is dynamic data injected into the prompt based on user input. This could come directly from the user, such as a freeform text input or schema controlled input. It could also contain other injected data, such as externally fetched content. The location of these inputs are set using placeholders in the static template and will vary for every prompt.
- **Model parameters:** This is where you define which language model you are using and any additional parameters for that model (eg. temperature).
## [](https://prmpts.ai/blog/what-is-prompt-engineering#example-fruit--color-hex)Example: Fruit → Color Hex
Let's look at one of my favourite examples: **Fruit → Color Hex**.
#### Prompt
Given the following fruit, output the closest color hex value that matches the color of that fruit. Fruit:
fruit
Color hex string:
completion
Tokens: 31
#### Inputs
#### Preview
Given the following fruit, output the closest color hex value that matches the color of that fruit. Fruit: Banana Color hex string:
completion
Tokens: 34
You'll notice the prompt has 3 sections:
1. **The prompt template:** This top section is the meat and potatoes of the prompt. It contains the core instructions and structure for the prompt. If you click on it, you'll see how the `fruit` input placeholder was created.
2. **Inputs and preview:** For every input placeholder in the template, an input is created below. In this example, the `fruit` input is a simple free-form text box. Next to the inputs is a text preview to help you visualize what the final prompt will look like before its sent.
3. **Model parameters:** At the bottom you choose which language model you want to use for this prompt. As more language models are released (from multiple organizations), you can experiment with them here.
The goal of this specific prompt is to produce a color hex value that best matches the color of the fruit provided.
Notice how we designed our prompt template. You can logically break it down into multiple parts: a context, task, label, and placeholder. Let's identify each one:
- **Context:**
```
Given the following fruit,
```
- **Task:**
```
output the closest color hex value that matches the color of that fruit.
```
- **Placeholder with label:**
```
Fruit:
{{ fruit }}
```
- **Completion label:**
```
Color hex string:
```
Why did we break up the prompt this way? Let's explore this in the next section about tips for effective prompts.
## [](https://prmpts.ai/blog/what-is-prompt-engineering#tips-for-effective-prompts)Tips for effective prompts
The structure of an effective prompt varies depending on your goals. But as a general rule of thumb, the following components are recommended:
1. **Identity:** Give the language model an identity.
```
You are a question-answer bot for a luxury watch website.
```
The goal with identity is to prime the language model with context that will reinforce the task you will ask to it do.
2. **Context:** Give context when applicable. For example, a luxury watch bot will need to know as much information as possible about the product in order to answer questions about it. We must inject this information into the prompt to give it content to work with.
```
Given the following information about the product:
{{ productInformation }}
```
3. **Task:** Explain the model's job.
```
Answer the following question from a customer about the above watch product.
```
4. **Conditions:** Prevent the model from hallucinating (making up answers) by adding a condition to the task.
```
If the answer is not provided above or you are unsure, reply with "Sorry, I don't know."
```
5. **Labels:** Labels help set expectations and structure for the model. Without labels, models will sometimes try to add on to the task itself instead of performing the task. In our example, it would be wise to label our question and answer:
```
Question: """
{{ question }}
"""
Answer:
```
Notice that we also wrap our question input in triple quotes. This helps make the input explicit for the model. It also helps mitigate against prompt injection.
6. **User input:** As you can see above, we needed a place to inject user input. Most prompt tools will provide a templating language to allow you to set placeholders within your prompt:
```
{{ question }}
```
Keep in mind that any of the above components have the ability to be dynamically injected as required. For example, context is a prime candidate for dynamic injection since this information may be constantly changing and unknown at build time. Likely you would retrieve context from a database, knowledge base, or external API. You can use embeddings to determine which content is most relevant when injecting.
Here's the final result:
#### Prompt
You are a question-answer bot for a luxury watch website. Given the following information about the product:
productInformation
Answer the following question from a customer about the above watch product. If the answer is not provided above or you are unsure, reply with "Sorry, I don't know." Question: """
question
""" Answer:
completion
Tokens: 71
#### Inputs
#### Preview
You are a question-answer bot for a luxury watch website. Given the following information about the product: \- Stainless steel - Designed for men and women, but not children - $500 - $5000 range - Gold and rose gold material accent options - Watches are in analog - No digital watches Answer the following question from a customer about the above watch product. If the answer is not provided above or you are unsure, reply with "Sorry, I don't know." Question: """ What are they made of? """ Answer:
completion
Tokens: 121
## [](https://prmpts.ai/blog/what-is-prompt-engineering#is-prompt-engineering-the-same-as-fine-tuning)Is Prompt Engineering the same as fine-tuning?
Not exactly. Fine-tuning is the process of re-training the language model itself with custom training data. Fine-tuning is just one of many tools in a Prompt Engineers tool belt to produce the desired outcome.
Fine-tuning is not always the answer. You will often pay a premium to fine-tune a model, both during the training process and for every future completion request after that. You may be surprised how far you can get using other Prompt Engineering techniques like context injection + embeddings.
## [](https://prmpts.ai/blog/what-is-prompt-engineering#what-is-prmptsai)What is [prmpts.AI](https://prmpts.ai/)?
[prmpts.AI](http://prmpts.ai/) is a prompt engineering playground to test and share robust prompts with others. Instead of proprietizing our discoveries, lets keep this technology open and explore it together.
@@ -0,0 +1,139 @@
---
page-title: "[Pdns-users] TCP Connection Thread died because of STL error: Reading data: Connection reset by peer"
url: https://mailman.powerdns.com/pipermail/pdns-users/2010-May/018731.html
date: "2023-04-19 12:18:15"
---
**David J Craigon** [david at craigon.co.uk](mailto:pdns-users%40mailman.powerdns.com?Subject=Re%3A%20%5BPdns-users%5D%20TCP%20Connection%20Thread%20died%20because%20of%20STL%20error%3A%0A%09Reading%20data%3A%20Connection%20reset%20by%20peer&In-Reply-To=%3CAANLkTilZB2deCtEBractNCNUomBCPEol3VrOE-ZBZoV4%40mail.gmail.com%3E "[Pdns-users] TCP Connection Thread died because of STL error: Reading data: Connection reset by peer")
*Wed May 26 13:29:25 UTC 2010*
- Previous message: [\[Pdns-users\] Power DNS 2.9.22 compile error while running 'make' command](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/018736.html)
- Next message: [\[Pdns-users\] TCP Connection Thread died because of STL error: Reading data: Connection reset by peer](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/018740.html)
- **Messages sorted by:** [\[ date \]](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/date.html#18731) [\[ thread \]](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/thread.html#18731) [\[ subject \]](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/subject.html#18731) [\[ author \]](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/author.html#18731)
---
I've got to the bottom of it, sort of.
Firstly, only dig seems to cause this problem If I try it with
nslookup on Windows, it seemed to work.
It works if I put in a manual serial number in the SOA records.
Otherwise PowerDNS was putting out 0 a serial number in the SOA, which
dig didn't like.
Any idea how to get automatic serial numbers working?
According to the manual:
"If left at 0, the default, PDNS will perform an internal list of the
domain to determine highest change\_date field of all records within
the zone, and use that as the zone serial number. "
So what goes in the change\_date field? I tried putting 20100526 as a
numerical representation of now, but it was still putting out 0 as a
serial number.
David
On 26 May 2010 12:21, David J Craigon <[david at craigon.co.uk](http://mailman.powerdns.com/mailman/listinfo/pdns-users)\> wrote:
> *DB schema is exactly as here:*
\>
\> *[http://doc.powerdns.com/generic-mypgsql-backends.html](http://doc.powerdns.com/generic-mypgsql-backends.html)*
\>
\> *with the only difference that I have put these tables in a schema*
\> *"dns" in the database, since I want to use the database for other*
\> *things too.*
\>
\> *These are my database queries- they are exactly the same as the*
\> *defaults, except for adding dns. to the beginning of every table name.*
\>
\> *# database queries*
\>
\> *gpgsql-basic-query=select content,ttl,prio,type,domain\_id,name from*
\> *dns.records where type='%s' and name='%s'*
\>
\> *gpgsql-id-query=select content,ttl,prio,type,domain\_id,name from*
\> *dns.records where type='%s' and name='%s' and domain\_id=%d*
\>
\> *gpgsql-any-query=select content,ttl,prio,type,domain\_id,name from*
\> *dns.records where name='%s'*
\>
\> *gpgsql-any-id-query=select content,ttl,prio,type,domain\_id,name from*
\> *dns.records where name='%s' and domain\_id=%d*
\>
\> *gpgsql-list-query=select content,ttl,prio,type,domain\_id,name from*
\> *dns.records where domain\_id=%d*
\>
\>
\>
\> *gpgsql-master-zone-query=select master from dns.domains where*
\> *name='%s' and type='SLAVE'*
\>
\> *gpgsql-info-zone-query=select*
\> *id,name,master,last\_check,notified\_serial,type from dns.domains where*
\> *name='%s'*
\>
\> *gpgsql-info-all-slaves-query=select id,name,master,last\_check,type*
\> *from dns.domains where type='SLAVE'*
\>
\> *gpgsql-supermaster-query=select account from dns.supermasters where*
\> *ip='%s' and nameserver='%s');*
\>
\> *gpgsql-insert-slave-query=insert into dns.domains*
\> *(type,name,master,account) values('SLAVE','%s','%s','%s')*
\>
\> *gpgsql-insert-record-query=insert into dns.records*
\> *(content,ttl,prio,type,domain\_id,name) values*
\> *('%s',%d,%d,'%s',%d,'%s')*
\>
\> *gpgsql-update-serial-query=update dns.domains set notified\_serial=%d where id=%d*
\>
\> *gpgsql-update-lastcheck-query=update dns.domains set*
\> *notified\_serial=%d where id=%d*
\>
\> *gpgsql-info-all-master-query=select*
\> *id,name,master,last\_check,notified\_serial,type from dns.domains where*
\> *type='MASTER'*
\>
\> *gpgsql-delete-zone-query=delete from dns.records where domain\_id=%d*
\>
\>
\>
\> *gpgsql-wildcard-query=select content,ttl,prio,type,domain\_id,name from*
\> *dns.records where type='%s' and name like '%s'*
\>
\> *gpgsql-wildcard-id-query=select content,ttl,prio,type,domain\_id,name*
\> *from dns.records where type='%s' and name like '%s' and domain\_id=%d*
\>
\> *gpgsql-wildcard-any-query=select content,ttl,prio,type,domain\_id,name*
\> *from dns.records where name like '%s'*
\>
\> *gpgsql-wildcard-any-id-query=select*
\> *content,ttl,prio,type,domain\_id,name from dns.records where name='%s'*
\> *and domain\_id=%d*
\>
\>
\> *David*
\>
\> *On 26 May 2010 12:00, bert hubert <[bert.hubert at netherlabs.nl](http://mailman.powerdns.com/mailman/listinfo/pdns-users)\> wrote:*
\>> *On Wed, May 26, 2010 at 11:59:31AM +0100, David J Craigon wrote:*
\>>> *Adding a TTL doesn't help. Without one, ordinary queries are responded*
\>>> *to with the default TTL.*
\>>
\>> *Ok - can you show all your queries from the configuration? And your db schema?*
\>>
\>>        *Bert*
\>>
\>
---
- Previous message: [\[Pdns-users\] Power DNS 2.9.22 compile error while running 'make' command](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/018736.html)
- Next message: [\[Pdns-users\] TCP Connection Thread died because of STL error: Reading data: Connection reset by peer](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/018740.html)
- **Messages sorted by:** [\[ date \]](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/date.html#18731) [\[ thread \]](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/thread.html#18731) [\[ subject \]](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/subject.html#18731) [\[ author \]](https://mailman.powerdns.com/pipermail/pdns-users/2010-May/author.html#18731)
---
[More information about the Pdns-users mailing list](http://mailman.powerdns.com/mailman/listinfo/pdns-users)
@@ -0,0 +1,61 @@
---
page-title: "fast.ai - GPT 4 and the Uncharted Territories of Language"
url: https://www.fast.ai/posts/2023-03-20-wittgenstein.html
date: "2023-04-10 10:57:57"
---
## Beyond Wittgensteins Walls[](https://www.fast.ai/posts/2023-03-20-wittgenstein.html#beyond-wittgensteins-walls)
> “*The limits of my language mean the limits of my world.*” — Ludwig Wittgenstein
Language is like a map that we use to navigate the world, but its also like a prison that keeps us from seeing whats beyond the walls.
But what if there was a way to break out of this prison, to expand our map, to explore new worlds with new words? This is the possibility and the challenge offered by instruction tuned language models like GPT 4, a cutting-edge technology that uses artificial neural networks to generate natural language texts based on user inputs.
GPT 4 can write anything from essays to novels to poems to tweets to code to recipes to jokes to lyrics to whatever you want. It can even write things that dont exist yet, things that no human has ever thought of or said before.
As Wittgensteins quote suggests, language is a source of limitation and liberation. GPT 4 pushes this idea to the extreme by giving us access to unlimited language.
This could be the most significant new technology in modern history because it has the potential to change many domains and industries. From education to entertainment, from journalism to justice, from science to art, these models could enable new forms of learning, storytelling, reporting, reasoning, discovery, and creation.
They could also create new ethical, social, and cultural challenges that require careful reflection and regulation. How we use this technology will depend on how we recognize its implications for ourselves and others.
This technology is a form of “Artificial Intelligence”. The word “intelligence” derives from *inter*\- (“between”) and *legere* (“to choose, pick out, read”). To be intelligent, then, is to be able to choose between things, to pick out what matters, to read what is written. Intelligence is not just a quantity or a quality; it is an activity, a process, a practice. It is something that we do with our minds and our words.
But when we let GPT 4 do this for us, are we not abdicating our intelligence? Are we not letting go of our ability to choose, to pick out, to read? Are we not becoming passive consumers of language instead of active producers?
![](https://www.fast.ai/images/wittgenstein.png)
Just doing what Im told…
## I didnt write that[](https://www.fast.ai/posts/2023-03-20-wittgenstein.html#i-didnt-write-that)
Ah, but heres the rub: the very words that have set the stage for this linguistic exploration were penned not by my own hand (or, rather, keyboard), but by the digital tendrils of Bing (which uses GPT 4). And so, we find ourselves in the throes of a meta-linguistic conundrum, as the very subject of our discussion has surreptitiously insinuated itself into the conversation.
Now, bear with me, for I have a purpose in revealing this sly subterfuge. My aim is to shatter the very expectations you hold about what language model-generated text looks like, feels like, and, indeed, reads like. For if youve made it this far, youve unwittingly been drawn into the web of AI-generated prose.
Perhaps it is only in grappling with the uncanny valley of language that we may find the strength to redefine our own linguistic boundaries and catch a fleeting glimpse of the world beyond the walls.
## Conclusion[](https://www.fast.ai/posts/2023-03-20-wittgenstein.html#conclusion)
In the end, GPT 4 presents us with a paradox. On one hand, it has the potential to expand our linguistic horizons and shatter the walls that confine us. On the other hand, it raises questions about the very nature of intelligence, creativity, and what it means to be human. As we delve deeper into the uncharted territories of language, we must be mindful of the delicate balance between embracing innovation and preserving our own intellectual autonomy.
The challenge, then, is to use GPT 4 as a catalyst for our own growth and exploration, rather than as a substitute for our own minds. By approaching this technology with curiosity, humility, and a commitment to ethical considerations, we can venture beyond Wittgensteins walls and chart new territories in language, thought, and human potential.
## I didnt write that either[](https://www.fast.ai/posts/2023-03-20-wittgenstein.html#i-didnt-write-that-either)
Actually, the *entire* article above was written by GPT 4. I created this article because I havent seen good examples of what model-generated prose can look like, and because I wanted to experiment with the idea of creating an entire article using GPT 4.
To create it, I used the following four prompts:
- “Write a four paragraph introduction to a draft New Yorker article which explains the capabilities of instruction tuned language models such as GPT 4. Begin with a quote from a classical philosopher or writer, and weave references to the quote into the introduction.” [1](https://www.fast.ai/posts/2023-03-20-wittgenstein.html#fn1)
- “Write four more paragraphs of this article, discussing the pros and cons of this technology. Incorporate the latin, french, or greek etymology of some word related to the topic and weave it into the article.”
- Then I started a new session, and requested: “In a completely different writing style to the introduction, following the style of David Foster Wallace, complete the following article by explaining that it was actually generated by Bing.” I then pasted the draft article into the prompt.
- Then I started a new session again with this prompt, pasting the article after the prompt: “The input text is an article which is missing the final section. Please write, in the style of Jeremy Howard, 2 possible final sections of 2-3 paragraphs each.”
I then deleted some clauses and sentences, but I didnt otherwise modify any of them in any way, except to add the text “(which uses GPT 4)” after “Bing”. I also manually created the image which Bing suggested I use and pasted it into the article.
The warning that GPT wrote at the end, “the challenge, then, is to use GPT 4 as a catalyst for our own growth and exploration, rather than as a substitute for our own minds” feels like a warning to me about this article. It ended up heading in a direction that I didnt really plan, and in hindsight Im now not at all sure whether it helped my exploration, or substituted for my own mind.
In the end, this experiment has only left me feeling more confused and uneasy.
1. Theres this formulaic thing used in a certain class of articles where theyll open with a quote from an institutionally-approved writer and signal their status in other ways, such as by weaving in latin etymology. Its a form of gate-keeping, and therefore I dont like it, and I wanted to break it down. Thats why I picked the first two prompts. Now you can (at least roughly) mimic any writing style, as long as you can describe it, even if youre not immersed in the culture that its associated with. This will make certain people really mad.[↩︎](https://www.fast.ai/posts/2023-03-20-wittgenstein.html#fnref1)
@@ -0,0 +1,188 @@
---
page-title: "matrixgpt/matrix-chatgpt-bot: Talk to ChatGPT via any Matrix client!"
url: https://github.com/matrixgpt/matrix-chatgpt-bot
date: "2023-04-18 13:34:30"
---
## Matrix ChatGPT Bot
Talk to ChatGPT via any Matrix client!
[![Screenshot of Element iOS app showing conversation with bot](https://github.com/matrixgpt/matrix-chatgpt-bot/raw/main/img/matrix-chatgpt.png)](https://github.com/matrixgpt/matrix-chatgpt-bot/blob/main/img/matrix-chatgpt.png)
A Matrix bot that uses [waylaidwanderer/node-chatgpt-api](https://github.com/waylaidwanderer/node-chatgpt-api) to access the official ChatGPT API.
## Warning for users upgrading from version 2.x
OpenAI released the [official API for ChatGPT](https://openai.com/blog/introducing-chatgpt-and-whisper-apis). Thus, we no longer have to use any older models or any models which kept on being turned off by OpenAI. This means the bot is now way more stable and way faster. However, please note: The usage of the API is **no longer free**. If you use this bot, your OpenAI account **will be charged**! You might want to limit your budget in your account using the [OpenAI website](https://platform.openai.com/account/billing). You need to remove the `CHATGPT_MODEL` variable from your environment, if you changed the value.
## Usage
1. Create a room
2. Add the bot
3. Start chatting.
## Features
- Shows typing indicator as ChatGPT is thinking!
- Supports encryption
- Stores context for ChatGPT conversations
## Configure
Create a copy of the example `.env` file
Adjust all required settings in the `.env` file before running. Optional settings can also be adjusted later.
## Prerequsistes
### Matrix
- You need a Matrix account on [Matrix.org](https://matrix.org/) (or any other server) for the bot user.
- By default, anyone that knows the name of your bot can invite it to rooms or chat with it.
- Restrict access with `MATRIX_BLACKLIST` or `MATRIX_WHITELIST`
- Restrict access with `MATRIX_BLACKLIST_ROOMS` or `MATRIX_WHITELIST_ROOMS`
- When using a self-hosted setup, you could wildcard all your users with `MATRIX_WHITELIST=:yourhomeserver.example`.
### OpenAI / ChatGPT
- You need to have an account at [openai.com](https://openai.com/). Please note that the usage of the ChatGPT-API is not free.
- Create a [API Key](https://platform.openai.com/account/api-keys). Then, set `OPENAI_API_KEY` in your `.env` file
- You can change the chat-model by setting the `CHATGPT_API_MODEL` in your `.env` file. ChatGPT is the `gpt-3.5-turbo`\-model which is the default. Please note that depending on the model your OpenAI account will be charged.
## Setup
- Set `MATRIX_BOT_USERNAME`
- Set `MATRIX_BOT_PASSWORD` (you can remove this later if you want)
- Run the app using one of the methods below.
- Copy `MATRIX_ACCESS_TOKEN` from the output.
- Set `MATRIX_ACCESS_TOKEN`, you can now remove `MATRIX_BOT_PASSWORD`.
*Note*: Doing any of the following can cause issues with encryption later on:
- Using this token with any other client.
- Using an access token extracted via Element.
- Deleting the storage folder.
- Switching between environments (e.g. Docker or no Docker)
## Run
There are multiple ways to run this bot. The easiest way is to run it within docker.
## with Docker
This is the recommended way to run this project. It will use the latest stable release.
```
docker run -it -v storage:/storage --env-file=./.env --name matrix-chatgpt-bot ghcr.io/matrixgpt/matrix-chatgpt-bot:latest
```
or to build locally from the latest unstable release (only do this if you have a good reason):
```
docker build . -t matrix-chatgpt-bot
docker run -it -v storage:/storage --env-file=./.env --name matrix-chatgpt-bot matrix-chatgpt-bot
```
Note: Without -it flags in the command above you won't be able to stop the container using Ctrl-C
Note: In order to see the output of your console you need to run `docker logs matrix-chatgpt-bot`
## with Docker Compose
If you prefer you can use a docker-compose file. Copy the content below and save it in a file named `docker-compose.yml`. Either with a self-build image (run `docker build . -t matrix-chatgpt-bot` from your local git repo location) or with the latest stable pre-built release from this repo (the **recommended** way).
The script will look for the `.env` file in the same folder as the `docker-compose.yml`. The key storage folder `storage` will be created in the same folder as well. Adjust the locations to your needs.
```
version: '3.7'
services:
matrix-chatgpt-bot:
container_name: matrix-chatgpt-bot
image: ghcr.io/matrixgpt/matrix-chatgpt-bot:latest ## change to "matrix-chatgpt-bot" if you want to use your self-build image
volumes:
- ./storage:/storage
env_file:
- ./.env
```
## without Docker
**Important**: It is strongly recommended to run this package under Docker to not need to install various dependencies manually. Nevertheless, you can also run it by using the package manager yarn (get it via `apt install -y yarn`). You might also need to have a newer version of Node.js and other missing packages.
- `yarn`
- `yarn build`
- `yarn start`
## in Development
You only need to do this if you want to contribute code to this package.
- Run `yarn`
- Run `yarn build`
## Good to know
- By default "storage"-folder contains all your encryption keys. If you delete it, you will loose access to all your encrypted messages.
- You can use a [Keyv](https://github.com/jaredwray/keyv) storage backend for persistence if you prefer (advanced).
- The bot uses threads by default, to keep the context you should reply to this thread or the bot will think its a new conversation. "Threads" were previously experimental, you may need to activate them in your client's settings (e.g. in Element in the "lab"-section).
- There is support to set the context to work at either the:
- room level
- thread level
- both (threads fork the conversation from the main room)
## FAQ
## I get "\[Error: decryption failed because the room key is missing\]"
Encryption works great with this package but can sometimes be a bit sensitive. Following steps can help to solve the "encryption" error
- Don't use a `MATRIX_ACCESS_TOKEN` extracted via Element-App, use the generated token from the bot based on your `MATRIX_BOT_USERNAME` & `MATRIX_BOT_PASSWORD` set in the `env`file. It will be visible in the console at start up if the `MATRIX_ACCESS_TOKEN` is not already set:
1. Remove the `MATRIX_ACCESS_TOKEN` from the `env` file and make sure `MATRIX_BOT_USERNAME` & `MATRIX_BOT_PASSWORD` are set
2. Re-run the bot
3. Copy the token from console output to your `env` file
4. Restart the bot again.
- If all fails, you can always reset your key storage. It's important to exercise all of the following steps, because any remaining data could lead to the next encryption error. Once everything is working, make sure to not touch the "storage" folder anymore:
1. Stop the bot
2. Delete the "storage" folder
3. Delete all user data for the matrix bot account (e.g. use Synapse-Admin) or create a fresh bot user account (you can then skip step 4)
4. Log into your bot account (e.g. via Element) and log out of all sessions
5. Verify the correctness of your `env` file and then run the bot setup again (e.g. via `docker-compose up` if you use docker-compose).
## I want to chat with the bot without dealing with encryption problems
- Set `MATRIX_ENCRYPTION=false` in your env-file and restart the bot. If it previously was running with encryption switched on, you need to create a new room with the bot as encryption can't be switched off once it was activated.
## I get "{ errcode: 'M\_NOT\_FOUND', error: 'Event not found.' }"
- So far, its not known to cause issues, you can safely ignore it.
## How do I know that the bot is running succesfully?
Once the bot has started succesfully, it will output the following information to your console.
- `[INFO] [index] Starting bot...`
- `[INFO] [MatrixClientLite] End-to-end encryption enabled` ## this depends on your setup
- `[INFO] [index] Bot started!`
## I use Docker but I don't see any console output
You most likely need to view the logs by running `docker logs matrix-chatgpt-bot`
## Reporting issues
Please report issues via Github. The chat room is for discussion.
Please use the search on Github and Matrix before asking for support.
## Discussion
Join [#matrix-chatgpt-bot:matrix.org](https://matrix.to/#/#matrix-chatgpt-bot:matrix.org) with any Matrix chat client or on the web!
If you've never set up a Matrix client before you can follow the prompts to get started.
## License
GNU AGPLv3. See LICENSE
@@ -0,0 +1,46 @@
---
page-title: "prmpts.AI - Prompt sandbox"
url: https://prmpts.ai/
date: "2023-04-23 12:41:12"
---
[![logo](https://prmpts.ai/_next/static/media/logo.72d4dbf5.svg)](https://prmpts.ai/)
What is Prompt Engineering?
[Read our blog post](https://prmpts.ai/blog/what-is-prompt-engineering).
#### Prompt
Given the following fruit, output the closest color hex value that matches the color of that fruit. Fruit:
fruit
Color hex string:
completion
Tokens: 31
#### Inputs
fruit
#### Preview
Given the following fruit, output the closest color hex value that matches the color of that fruit. Fruit: Banana Color hex string:
completion
Tokens: 34
Family
GPT-3
Model
text-davinci-003
Ctrl+Enter
[![logo](https://prmpts.ai/_next/static/media/logo-icon.881a4e0e.svg)© 2023 prmpts**.AI**](https://prmpts.ai/)
@@ -0,0 +1,137 @@
---
page-title: "yarmo/delightful-matrix: A curated list of delightful Matrix resources, implementations and clients. - delightful-matrix - Codeberg.org"
url: https://codeberg.org/yarmo/delightful-matrix
date: "2023-04-18 22:39:48"
---
## [](https://codeberg.org/yarmo/delightful-matrix#delightful-matrix-delightful-https-codeberg-org-teaserbot-labs-delightful-media-branch-master-assets-delightful-badge-png-https-codeberg-org-teaserbot-labs-delightful)delightful matrix [![delightful](https://codeberg.org/teaserbot-labs/delightful/media/branch/master/assets/delightful-badge.png)](https://codeberg.org/teaserbot-labs/delightful)
A curated list of delightful Matrix resources, implementations and clients.
## [](https://codeberg.org/yarmo/delightful-matrix#table-of-contents)Table of contents
- [General resourcess](https://codeberg.org/yarmo/delightful-matrix#user-content-general-resources)
- [Server implementations](https://codeberg.org/yarmo/delightful-matrix#user-content-server-implementations)
- [Clients](https://codeberg.org/yarmo/delightful-matrix#user-content-clients)
- [Client SDKs](https://codeberg.org/yarmo/delightful-matrix#user-content-client-sdks)
- [Projects based on Matrix](https://codeberg.org/yarmo/delightful-matrix#user-content-projects-based-on-matrix)
- [Maintainers](https://codeberg.org/yarmo/delightful-matrix#user-content-maintainers)
- [Contributors](https://codeberg.org/yarmo/delightful-matrix#user-content-contributors)
- [License](https://codeberg.org/yarmo/delightful-matrix#user-content-license)
Emoji for each entry provide additional information on project status:
- 👻 == inactive for over a year, or officially abandoned
## [](https://codeberg.org/yarmo/delightful-matrix#general-resources)General resources
- [Matrix Spec](https://spec.matrix.org/latest/): the official spec that defines the communication protocols and allows all servers and apps to communicate with each other. `Apache-2.0`
## [](https://codeberg.org/yarmo/delightful-matrix#server-implementations)Server implementations
- [Conduit](https://gitlab.com/famedly/conduit) ([site](https://conduit.rs/)): A lightweight open-source server implementation of the Matrix Specification with a focus on easy setup and low system requirements. `Apache-2.0, Rust`
- [Construct](https://github.com/matrix-construct/construct): A performance-oriented homeserver with minimal dependencies, the first actively federating Matrix server developed independently by the community. `BSD, C++`
- [Dendrite](https://github.com/matrix-org/dendrite) ([site](https://matrix.org/docs/projects/server/dendrite)): A second-generation Matrix homeserver written in Go. `Apache-2.0, Go`
- [Synapse](https://github.com/matrix-org/synapse) ([site](https://matrix.org/docs/projects/server/synapse)): Matrix homeserver written in Python 3/Twisted. `Apache-2.0, Python`
- 👻 [Ligase](https://github.com/finogeeks/Ligase): A Cloud-native Matrix home server written in Golang. `AGPL-3.0, Go`
- 👻 [Maelstrom](https://github.com/maelstrom-rs/maelstrom): A high-performance Matrix Home-Server written in Rust designed to be scalable, light on resources, and have a pluggable storage engine. `Apache-2.0 or MIT, Rust`
## [](https://codeberg.org/yarmo/delightful-matrix#clients)Clients
- [\[chat\]](https://git.cybre.town/adb/matrix-chat) ([app](https://chat.adb.sh/)): A simple matrix webapp for mobile and desktop. `MPL-2.0, JavaScript`
- [Cinny](https://github.com/ajbura/cinny) ([site](https://cinny.in/)): Yet another matrix client (web). `MIT, JavaScript`
- [Ditto Chat](https://gitlab.com/ditto-chat/ditto) ([site](https://www.dittochat.org/)): An attractive Matrix client built in React Native (Android, iOS, web). `GPL-3.0-or-later, JavaScript`
- [Element](https://github.com/vector-im) ([site](https://element.io/)): A glossy web client with an emphasis on performance and usability (Android, iOS, desktop, web). `Apache 2.0, JavaScript/Kotlin/Objective-C`
- [FluffyChat](https://gitlab.com/famedly/fluffychat) ([site](https://fluffychat.im/)): Cute instant messaging app for all platforms (Android, iOS, desktop, web). `AGPL-3.0-only, Dart`
- [Fractal](https://gitlab.gnome.org/GNOME/fractal) ([site](https://wiki.gnome.org/Apps/Fractal)): A Matrix messaging app for GNOME written in Rust (Linux). `GPL-3.0-only, Rust`
- [gomuks](https://github.com/tulir/gomuks) ([site](https://matrix.org/docs/projects/client/gomuks)): A terminal based Matrix client written in Go. `AGPL-3.0-or-later, Go`
- [Hydrogen](https://github.com/vector-im/hydrogen-web) ([app](https://hydrogen.element.io/)): Lightweight matrix client with legacy and mobile browser support (web). `Apache-2.0, TypeScript`
- [kazv](https://lily-is.land/kazv/kazv): A convergent qml/kirigami client based on libkazv (Linux). `AGPL-3.0-or-later, C++`
- [matrix-commander](https://github.com/8go/matrix-commander): Simple but convenient CLI-based Matrix client app for sending, receiving, creating rooms, inviting, verifying, and so much more. `GPL-3.0-or-later, Python`
- [matrix-static](https://github.com/matrix-org/matrix-static): A static golang generated preview of public world readable Matrix rooms. `Apache-2.0, Go`
- [NeoChat](https://invent.kde.org/network/neochat): A client for Matrix (desktop, mobile). `GPL-3.0-only, C++`
- [Nheko](https://github.com/Nheko-Reborn/nheko) ([site](https://nheko-reborn.github.io/)): A native desktop app for Matrix that feels more like a mainstream chat app (Linux, macOS). `GPL-3.0-or-later, C++`
- [Nio](https://github.com/niochat/nio) ([site](https://nio.chat/)): An upcoming Matrix client for iOS built with SwiftUI. `MPL-2.0, Swift`
- [Quaternion](https://github.com/quotient-im/Quaternion): A Qt5-based IM client for Matrix (desktop). `GPL-3.0-only, C++`
- [QuickMedia](https://git.dec05eba.com/QuickMedia/about): A native client for web services including Matrix. `GPL-3.0-or-later, C++`
- [SchildiChat](https://github.com/SchildiChat) ([site](https://schildi.chat/)): A Matrix client based on Element with a more traditional instant messaging experience (Android, desktop, web). `Apache-2.0, JavaScript/Kotlin`
- [Syphon](https://github.com/syphon-org/syphon) ([site](https://syphon.org/)): A not for profit, open source matrix client with a focus on privacy and ease of use (mobile, desktop). `AGPL-3.0-or-later, Dart`
- 👻 [AgentSmith](https://github.com/nilsding/AgentSmith): An IRC server that is actually a Matrix client. Use your favourite IRC client to communicate with the Matrix. `MIT, Crystal`
- 👻 [Koma](https://github.com/koma-im/continuum-desktop): A pure Kotlin Matrix client (Linux, macOS). `GPL-3.0-only, Kotlin`
- 👻 [matrix-client.el](https://github.com/alphapapa/matrix-client.el): A Matrix client for Emacs. `GPL-3.0-only, Lisp`
- 👻 [matrix-ircd](https://github.com/matrix-org/matrix-ircd): An IRCd implementation backed by Matrix. `Apache-2.0, Rust`
- 👻 [Mirage](https://github.com/mirukana/mirage): A fancy, customizable, keyboard-operable Qt/QML & Python Matrix chat client (desktop). `LGPL-3.0-or-later, Python`
- 👻 [Scylla](https://github.com/DanilaFe/Scylla) ([app](https://scylla.danilafe.com/)): An Elm-based front-end for Matrix (web) `MIT, Elm`
- 👻 [Rambox](https://github.com/ramboxapp/community-edition) ([site](https://rambox.app/)): Cross platform messaging and emailing app that combines common web applications into one. `GPL-3.0-only, JavaScript`
## [](https://codeberg.org/yarmo/delightful-matrix#client-sdks)Client SDKs
### [](https://codeberg.org/yarmo/delightful-matrix#typescript-javascript)TypeScript & JavaScript
- [matrix-appservice-bridge](https://github.com/matrix-org/matrix-appservice-bridge): Bridging infrastructure for Application Services. `Apache-2.0, TypeScript`
- [matrix-appservice-node](https://github.com/matrix-org/matrix-appservice-node): Matrix Application Service framework in Node.js. `Apache-2.0, TypeScript`
- [matrix-bot-sdk](https://github.com/turt2live/matrix-bot-sdk): TypeScript/JavaScript SDK for Matrix bots. `MIT, TypeScript`
- [matrix-js-sdk](https://github.com/matrix-org/matrix-js-sdk): A Matrix Client-Server SDK for JavaScript. `Apache-2.0, TypeScript`
- [matrix-react-sdk](https://github.com/matrix-org/matrix-react-sdk): A Matrix SDK for React Javascript. `Apache-2.0, TypeScript`
- [smallbot-matrix](https://github.com/enimatek-nl/small-bot-matrix): Small Matrix Little Bot for Deno. `MIT, TypeScript`
- 👻 [botkit-matrix](https://github.com/frankgerhardt/botkit-matrix): A Botkit connector for Matrix. `Apache-2.0, JavaScript`
### [](https://codeberg.org/yarmo/delightful-matrix#python)Python
- [mautrix-python](https://github.com/mautrix/python): A Python 3 asyncio Matrix framework. `MPL-2.0, Python`
- [simple-matrix-bot-lib](https://github.com/KrazyKirby99999/simple-matrix-bot-lib): An easy to use bot library for the Matrix ecosystem written in Python. `MIT, Python`
- [µtrix](https://edugit.org/Teckids/hacknfun/libs/mytrix): A Matrix client library for MicroPython. `Apache-2.0, Python`
- 👻 [matrix-python-sdk](https://github.com/matrix-org/matrix-python-sdk): A Matrix Client-Server SDK for Python 2 and 3. `Apache-2.0, Python`
### [](https://codeberg.org/yarmo/delightful-matrix#kotlin)Kotlin
- [dial-phone](https://github.com/mtorials/dial-phone): A Matrix client-server SDK for JVM written in Kotlin. `Apache-2.0, Kotlin`
- [matrix-kt](https://github.com/Dominaezzz/matrix-kt): Kotlin multiplatform libraries for Matrix. `Apache-2.0, Kotlin`
- [Trixnity](https://gitlab.com/benkuly/trixnity): A Multiplatform Kotlin SDK for Matrix. `AGPL-3.0-or-later, Kotlin`
### [](https://codeberg.org/yarmo/delightful-matrix#rust)Rust
- [matrix-rust-sdk](https://github.com/matrix-org/matrix-rust-sdk): Matrix Client-Server SDK for Rust. `Apache-2.0, Rust`
- [ruma](https://github.com/ruma/ruma) ([site](https://www.ruma.io/)): A set of Rust crates for interacting with the Matrix chat network. `MIT, Rust`
### [](https://codeberg.org/yarmo/delightful-matrix#c)C++
- [libkazb](https://lily-is.land/kazv/libkazv): A matrix client SDK built upon lager and the value-oriented design it enables. `AGPL-3.0-or-later, C++`
- [libQuotient](https://github.com/quotient-im/libQuotient): A Qt5 library to write cross-platform clients for Matrix. `LGPL-2.1, C++`
### [](https://codeberg.org/yarmo/delightful-matrix#c-1)C#
- [Matrix .NET SDK](https://github.com/baking-bad/matrix-dotnet-sdk): A .NET Standard 2.0 library compatible with the Matrix protocol. `MIT, C#`
- 👻 [MatrixAPI](https://github.com/VRocker/MatrixAPI): A Matrix library for C# UWP. `Apache-2.0, C#`
### [](https://codeberg.org/yarmo/delightful-matrix#go)Go
- [mautrix-go](https://github.com/mautrix/go) ([site](https://maunium.net/go/mautrix/)): A Golang Matrix framework. `MPL-2.0, Go`
- 👻 [gomatrix](https://github.com/matrix-org/gomatrix): A Golang Matrix client. `Apache-2.0, Go`
### [](https://codeberg.org/yarmo/delightful-matrix#other-languages)Other languages
- [dart-matrix-sdk](https://gitlab.com/famedly/company/frontend/famedlysdk): A Matrix SDK written in pure Dart. `AGPL-3.0, Dart`
- [Matrix::Client](https://github.com/matiaslina/Matrix-Client): A Raku library for Matrix. `Artistic-2.0, Raku`
- [Matrix-ClientServer-API-java](https://github.com/JojiiOfficial/Matrix-ClientServer-API-java): A small and simple java API. `GPL-3.0, Java`
- [matrix-ios-sdk](https://github.com/matrix-org/matrix-ios-sdk): A Matrix SDK for iOS. `Apache-2.0, Objective-C`
- [matrix-nio](https://github.com/poljar/matrix-nio) ([site](https://matrix-nio.readthedocs.io/en/latest/)): A Python Matrix client library, designed according to sans I/O principles. `ISC, Python`
- [ruby-matrix-sdk](https://github.com/ananace/ruby-matrix-sdk): A Ruby SDK for the Matrix communication protocol. `MIT, Ruby`
- 👻 [haxe-matrix-im](https://notabug.org/Tamaimo/haxe-matrix-im): Implementation of client-server matrix API in haxe using HaxeHttpClient. `AGPL-3.0-only, Haxe`
## [](https://codeberg.org/yarmo/delightful-matrix#projects-based-on-matrix)Projects based on Matrix
- [Cactus Comments](https://gitlab.com/cactus-comments) ([site](https://cactus.chat/)): A federated comment system for the web, based on the Matrix protocol. `GPL-3.0, Python`
## [](https://codeberg.org/yarmo/delightful-matrix#maintainers)Maintainers
If you have questions or feedback regarding this list, then please create an [Issue](https://codeberg.org/yarmo/delightful-matrix/issues) in our tracker, and optionally `@mention` one or more of our maintainers:
- [`@yarmo`](https://codeberg.org/yarmo)
## [](https://codeberg.org/yarmo/delightful-matrix#contributors)Contributors
With delight we present you some of our [delightful contributors](https://codeberg.org/yarmo/delightful-matrix/src/branch/main/delightful-contributors.md) (please [add yourself](https://codeberg.org/teaserbot-labs/delightful/src/branch/master/delight-us.md#attribution-of-contributors) if you are missing).
## [](https://codeberg.org/yarmo/delightful-matrix#license)License
[![CC0 Public domain. This work is free of known copyright restrictions.](https://i.creativecommons.org/p/mark/1.0/88x31.png)](https://creativecommons.org/publicdomain/zero/1.0/)