Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update-twitter-logo #issue 4289 #4434

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions docs/aws-integration/efs-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Sure! Here's the documentation for integrating AWS Elastic File System (EFS) for static code upload in CloudCV, formatted as a markdown file named `efs-setup.md`:

```markdown
# Documentation: AWS Elastic File System (EFS) Integration for Static Code Upload in CloudCV

## **Overview**
This documentation provides a comprehensive guide to integrating AWS Elastic File System (EFS) for the static code upload feature in CloudCV. EFS enables scalable and persistent storage to handle large-scale data uploads seamlessly. Follow the steps below to configure, mount, and use EFS within your environment.

---

## **Prerequisites**
Ensure the following requirements are met before starting:
- An active AWS account.
- IAM permissions to create and manage EFS, EC2 instances, and security groups.
- Installed AWS CLI (v2 or higher).
- SSH access to the EC2 instance used for the upload pipeline.

---

## **Step 1: Create an EFS File System**
1. **Log in** to the AWS Management Console and navigate to **Elastic File System (EFS)**.
2. Click **Create File System** and configure:
- **VPC**: Select the same VPC as your EC2 instance.
- **Performance Mode**: General Purpose is recommended for most use cases.
- **Throughput Mode**: Choose between Bursting or Provisioned based on workload.
3. Click **Create** to provision the EFS and note down its ID for later use.

---

## **Step 2: Configure Security Groups**
1. **Update EFS Security Group**:
- Add an inbound rule to allow NFS traffic (port 2049) from the EC2 instance's security group.
2. **Update EC2 Security Group**:
- Add an outbound rule to allow NFS traffic to the EFS security group.

---

## **Step 3: Mount EFS on EC2 Instance**
1. **Install the NFS client**:
```bash
sudo apt update && sudo apt install -y nfs-common # For Ubuntu/Debian
sudo yum install -y nfs-utils # For Amazon Linux/CentOS
```
2. **Create a mount directory**:
```bash
sudo mkdir -p /mnt/efs
```
3. **Mount the EFS file system**:
```bash
sudo mount -t nfs4 -o nfsvers=4.1 fs-<EFS-ID>.efs.<region>.amazonaws.com:/ /mnt/efs
```
4. **Verify the mount**:
```bash
df -h | grep efs
```

---

## **Step 4: Automate Mounting**
To make the EFS mount persistent across reboots:
1. Edit the `/etc/fstab` file:
```plaintext
fs-<EFS-ID>.efs.<region>.amazonaws.com:/ /mnt/efs nfs4 defaults,_netdev 0 0
```
2. Test the configuration:
```bash
sudo umount /mnt/efs
sudo mount -a
```

---

## **Step 5: Upload Data to EFS**
Transfer files to the mounted EFS directory:
```bash
scp -i <key.pem> <local-file-path> ec2-user@<EC2-IP>:/mnt/efs/
```

---

## **Step 6: Integrate with CloudCV**
1. **Update Configuration**:
- Modify the `code-upload` pipeline’s configuration to use the mounted EFS directory as the upload target.
- Example: Set the upload path to `/mnt/efs` in `settings.py` or `config.yaml`.
2. **Test Integration**:
- Run a sample upload to confirm the integration is working correctly.

---

## **Troubleshooting**
- **Permission Denied**: Verify the IAM roles, security group rules, and mount permissions.
- **Mount Failure**: Ensure the EC2 instance and EFS are in the same VPC.
- **Slow Transfers**: Optimize the throughput mode or consider enabling encryption.
1 change: 1 addition & 0 deletions evalai/EvalAI
Submodule EvalAI added at 39e2f2
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,10 @@ export class ChallengesubmitComponent implements OnInit {
SELF.submissionError = '';
if (SELF.components) {
SELF.components['_results'].forEach((element) => {
element.value = '';
element.message = '';
if (element.label !== 'submissionOptions') {
element.value = '';
element.message = '';
}
});
}
}
Expand Down Expand Up @@ -629,6 +631,7 @@ export class ChallengesubmitComponent implements OnInit {
self.globalService.setFormValueForLabel(self.components, 'method_description', '');
self.globalService.setFormValueForLabel(self.components, 'project_url', '');
self.globalService.setFormValueForLabel(self.components, 'publication_url', '');
self.isSubmissionUsingUrl = false; // Clear the submission type marker
});
self.isSubmitted = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h5 class="white-text">EvalAI</h5>
</li>
<li>
<a class="text-light-gray" href="https://twitter.com/eval_ai" target="_blank"
><i class="fa fa-twitter"></i
><i class="fa-brands fa-x-twitter"></i
></a>
</li>
</ul>
Expand Down
Binary file modified frontend_v2/src/assets/images/twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend_v2/src/assets/images/twitter_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend_v2/src/assets/images/twitter_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added new
Empty file.
1 change: 1 addition & 0 deletions pytorch_model.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Found. Redirecting to https://cdn-lfs.hf.co/bert-base-uncased/097417381d6c7230bd9e3557456d726de6e83245ec8b24f529f60198a67b203a?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27pytorch_model.bin%3B+filename%3D%22pytorch_model.bin%22%3B&response-content-type=application%2Foctet-stream&Expires=1736098505&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTczNjA5ODUwNX19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy5oZi5jby9iZXJ0LWJhc2UtdW5jYXNlZC8wOTc0MTczODFkNmM3MjMwYmQ5ZTM1NTc0NTZkNzI2ZGU2ZTgzMjQ1ZWM4YjI0ZjUyOWY2MDE5OGE2N2IyMDNhP3Jlc3BvbnNlLWNvbnRlbnQtZGlzcG9zaXRpb249KiZyZXNwb25zZS1jb250ZW50LXR5cGU9KiJ9XX0_&Signature=HBiOo28EiP%7ES4CR9j8CE2jIaoHTvm82VGqguTfmBW2ZbvTPFfQbfBk4QoTYW4YkssHsatUzivSfC1p-Mf8GNG7XVktnVobGj75wlFo-qoLT5sBIbfxXRajiyMAYNvUkMyzjiTJJ-TPTLoEwqJqoBEBQi2RSskmZ5RShEKniNSOmjk77UKnXpVS7BIwtKLb17H0lIt%7Ehx2%7EpyURVT9Xaeh1Nzon9ANwbrkmx--7cIqJDK3xtfmnUaIfUZGHPTsA7lPwfr%7EKZC-rn6SEn-HaNBwkVG28-CAkJvVa0WbRb9Z3sfVNoNZL1Pp8K-Jffo4H0Bi70p4fqx7xpxqEoNtCaAjQ__&Key-Pair-Id=K3RPWS32NSSJCE
17 changes: 9 additions & 8 deletions scripts/workers/code_upload_worker_utils/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# installing AWS CLI
# Installing AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
Expand All @@ -15,7 +15,7 @@ echo "### AWS CLI Configured"
curl -o aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.7/2020-07-08/bin/linux/amd64/aws-iam-authenticator
chmod +x ./aws-iam-authenticator
mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$PATH:$HOME/bin
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
echo 'export PATH=$PATH/$HOME/bin' >> ~/.bashrc
echo "### iam-authenticator Installed"

# Configure kubeconfig
Expand All @@ -38,6 +38,7 @@ kubectl create configmap fluent-bit-cluster-info \
--from-literal=read.head='On' \
--from-literal=read.tail='Off' \
--from-literal=logs.region=$AWS_DEFAULT_REGION -n amazon-cloudwatch

# Use FluentD compatible FluentBit insights
kubectl apply -f https://raw.githubusercontent.com/aws-samples/amazon-cloudwatch-container-insights/latest/k8s-deployment-manifest-templates/deployment-mode/daemonset/container-insights-monitoring/fluent-bit/fluent-bit-compatible.yaml
echo "### Container Insights Installed"
Expand All @@ -49,19 +50,19 @@ cat /code/scripts/workers/code_upload_worker_utils/persistent_volume.yaml | sed
kubectl apply -f /code/scripts/workers/code_upload_worker_utils/persistent_volume_claim.yaml
kubectl apply -f /code/scripts/workers/code_upload_worker_utils/persistent_volume_storage_class.yaml

# Install cilium
# Install Cilium
# Cilium is being used to provide networking and network policy
kubectl create -f https://raw.githubusercontent.com/cilium/cilium/v1.9/install/kubernetes/quick-install.yaml
echo "### Cilium Installed"

sleep 120s;

# Apply cilium network policy
# echo "### Setting up Cilium Network Policy..."
# cat /code/scripts/workers/code_upload_worker_utils/network_policies.yaml | sed "s/{{EVALAI_DNS}}/$EVALAI_DNS/" | kubectl apply -f -
# echo "### Cilium EvalAI Network Policy Installed"
# Apply Cilium Network Policy
echo "### Setting up Cilium Network Policy..."
cat /code/scripts/workers/code_upload_worker_utils/network_policies.yaml | sed "s/{{EVALAI_DNS}}/$EVALAI_DNS/" | kubectl apply -f -
echo "### Cilium EvalAI Network Policy Installed"

# Set ssl-certificate
# Set SSL certificate
echo $CERTIFICATE | base64 --decode > scripts/workers/certificate.crt

# Running Submission Worker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ spec:
- toFQDNs:
- matchPattern: {{EVALAI_DNS}}
- matchPattern: "*.ubuntu.com"
- matchPattern: "*.example.com" # Add any other necessary domains here
- toEndpoints:
- matchLabels:
"k8s:io.kubernetes.pod.namespace": kube-system
Expand All @@ -21,3 +22,9 @@ spec:
rules:
dns:
- matchPattern: "*"
- toPorts:
- ports:
- port: "443"
protocol: TCP
- port: "80"
protocol: TCP