Skip to content

Commit

Permalink
Merge pull request #70 from snuhcs-course/dev
Browse files Browse the repository at this point in the history
Hotfix for main
  • Loading branch information
SeongjunJo authored Nov 25, 2023
2 parents 6f2472b + ccf68fb commit c67a43b
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 15 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docker_build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ jobs:
cd backend
docker build -t "${{ secrets.DOCKER_USERNAME }}/haengsha-backend:latest" .
docker push "${{ secrets.DOCKER_USERNAME }}/haengsha-backend:latest"
- name: Deploy to EC2
run: |
- name: Stop Docker Container, Clean Up, Pull & Run
run: |
set +x
echo "${{ secrets.PEM }}" > key.pem
set -x
chmod 600 key.pem
ssh -i ./"key.pem" -o StrictHostKeyChecking=no ec2-user@${{ secrets.CLOUD_URL }} <<EOF
docker stop haeng
docker rm haeng
echo "Removing unused Docker images..."
docker rmi "${{ secrets.DOCKER_USERNAME }}/haengsha-backend:latest"
tmux kill-server || true
echo "Pulling new image..."
docker pull "${{ secrets.DOCKER_USERNAME }}/haengsha-backend:latest"
docker run -d --name haeng -p 8080:8000 --env-file haengsha-env/.env "${{ secrets.DOCKER_USERNAME }}/haengsha-backend:latest"
tmux new-session -d -s ml_session "docker exec haeng /bin/bash -c 'bash recommendation_pipeline.sh'"
EOF
EOF
3 changes: 3 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Generate and store the checksum
RUN find /app/ -type f -exec sha256sum {} + > app_checksum.txt

COPY . .

CMD ["gunicorn", "haengsha.wsgi:application", "--bind", "0.0.0.0:8000"]
13 changes: 13 additions & 0 deletions backend/post/migrations/0003_merge_20231116_0751.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated by Django 4.1 on 2023-11-16 07:51

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("post", "0002_alter_post_image"),
("post", "0002_recommend_post_recommend_users_recommend_post_and_more"),
]

operations = []
13 changes: 13 additions & 0 deletions backend/post/migrations/0004_merge_20231117_0815.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated by Django 4.1 on 2023-11-17 08:15

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("post", "0003_merge_20231116_0751"),
("post", "0003_merge_20231116_0822"),
]

operations = []
4 changes: 2 additions & 2 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ tenacity==8.2.3
threadpoolctl==2.2.0
tiktoken==0.5.1
# tk==8.6.12
torch
# torch
tornado==6.3.3
tqdm==4.66.1
traitlets==5.11.2
transformers
# transformers
typing-extensions==4.8.0
tzdata==2023.3
urllib3==2.0.6
Expand Down
12 changes: 6 additions & 6 deletions frontend/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ android {

dependencies {
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.activity:activity-compose:1.8.0")
implementation("androidx.activity:activity-compose:1.8.1")

implementation(platform("androidx.compose:compose-bom:2023.10.01"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")

implementation("com.google.android.material:material:1.11.0-beta01")
implementation("androidx.compose.material3:material3-android:1.2.0-alpha10")
implementation("com.google.android.material:material:1.12.0-alpha01")
implementation("androidx.compose.material3:material3-android:1.2.0-alpha11")

implementation("androidx.navigation:navigation-compose:2.7.5")
implementation("androidx.navigation:navigation-runtime-ktx:2.7.5")
Expand All @@ -76,7 +76,7 @@ dependencies {
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2")
implementation("androidx.collection:collection-ktx:1.4.0-alpha02")
implementation("androidx.collection:collection-ktx:1.4.0-beta01")

implementation("io.coil-kt:coil-compose:2.5.0")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
Expand All @@ -93,7 +93,7 @@ dependencies {
implementation("com.kizitonwose.calendar:compose:2.5.0-alpha01")
implementation("com.google.accompanist:accompanist-pager:0.12.0")
implementation("androidx.tv:tv-material:1.0.0-alpha10")
implementation("androidx.compose.runtime:runtime-livedata:1.6.0-alpha08")
implementation("androidx.compose.runtime:runtime-livedata:1.6.0-beta01")

testImplementation("junit:junit:4.13.2")
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
Expand All @@ -109,5 +109,5 @@ dependencies {
androidTestImplementation("androidx.test.espresso:espresso-intents:3.5.1")

debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.6.0-alpha08")
debugImplementation("androidx.compose.ui:ui-test-manifest:1.6.0-beta01")
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.PrimaryTabRow
import androidx.compose.material3.Tab
import androidx.compose.material3.TabRowDefaults
Expand Down Expand Up @@ -79,7 +80,7 @@ data class EventCardData(
val image: String = ""
)

@OptIn(ExperimentalFoundationApi::class)
@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterial3Api::class)
@Composable
fun TabView(
homeViewModel: HomeViewModel,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c67a43b

Please sign in to comment.