×
Community Blog Run DeepSeek on Alibaba Cloud in Just 5 Minutes

Run DeepSeek on Alibaba Cloud in Just 5 Minutes

This article introduces how to run DeepSeek on Alibaba Cloud in just 5 minutes by creating an Elastic Compute Service instance.

The computing service/instance in Alibaba Cloud is called Elastic Compute Services, we will take one of them to run the most powerful model in today's era.

Steps to Run DeepSeek:

Step 1:

Create an instance with the base image as Linux and the instance type as t5 which has almost around 20 GB of disk.

Step 2:

Install the Ollama on the linux instance.

Run the command to install Ollama

curl -fsSL https://ollama.com/install.sh | sh

Then, Start the Ollama service

ollama serve

Verify Ollama Installation

After installation check wether it is properly installed or not by running

ollama –version

1

Step 3:

Download and install DeepSeek- R1 model

Run the command to pull deepseek from Ollama’s library

ollama pull deepseek-r1 

2
3

Run the Deepseek to create anything with it.

4

Let’s create a simple function to calculate square of 2 numbers with DeepSeek

Output from DeepSeek

<think>
I need to create a Python function that calculates the squares of two numbers.

First, I'll define a function called `square_two_numbers` which takes two parameters, `a` and `b`.

Next, I'll compute the square of each number using exponentiation. So, `a_squared = a ** 2` and `b_squared = b **
2`.

Then, I'll return both squares as a tuple containing these values.

Finally, I'll test the function with example inputs to ensure it works correctly.
</think>

Here's a simple Python function that calculates the square of two numbers:

def square_two_numbers(a, b):
    """Calculate the square of two numbers."""
    return (a ** 2, b ** 2)

# Example usage:
print(square_two_numbers(3, 4))  # Output: (9, 16)

Explanation:

1.  Function Definition: The function square_two_numbers is defined to take two parameters, a and b.

2.  Calculate Squares: Inside the function, we calculate the square of each number using the exponentiation

operator (**). Specifically:

  • a ** 2 computes the square of a
  • b ** 2 computes the square of b

3.  Return Values: The function returns a tuple containing both squares.

4.  Example Usage: When you call square_two_numbers(3, 4), it returns (9, 16).

This function efficiently calculates and returns the squares of two numbers in a concise manner.

5
6

That’s it DeepSeek is running completely fine and fast.


Disclaimer: The views expressed herein are for reference only and don't necessarily represent the official views of Alibaba Cloud.

0 1 0
Share on

Neel_Shah

36 posts | 4 followers

You may also like

Comments