Spaces:
Runtime error
Runtime error
dockerfile writing permission
Browse files- Dockerfile +3 -1
- api/main.py +2 -3
Dockerfile
CHANGED
@@ -7,7 +7,7 @@ WORKDIR /code
|
|
7 |
|
8 |
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
-
|
11 |
|
12 |
RUN useradd -m -u 1000 user
|
13 |
USER user
|
@@ -16,6 +16,8 @@ ENV HOME=/home/user \
|
|
16 |
|
17 |
WORKDIR $HOME/app
|
18 |
|
|
|
|
|
19 |
COPY --chown=user . $HOME/app
|
20 |
|
21 |
RUN mkdir -p $HOME/app/data
|
|
|
7 |
|
8 |
COPY ./requirements.txt /code/requirements.txt
|
9 |
|
10 |
+
|
11 |
|
12 |
RUN useradd -m -u 1000 user
|
13 |
USER user
|
|
|
16 |
|
17 |
WORKDIR $HOME/app
|
18 |
|
19 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
20 |
+
|
21 |
COPY --chown=user . $HOME/app
|
22 |
|
23 |
RUN mkdir -p $HOME/app/data
|
api/main.py
CHANGED
@@ -7,7 +7,8 @@ from api.external_services import InitiazlizeGithubService, InitiazlizeActiveloo
|
|
7 |
|
8 |
# Load environment variables
|
9 |
load_dotenv()
|
10 |
-
|
|
|
11 |
|
12 |
app = FastAPI()
|
13 |
|
@@ -25,8 +26,6 @@ async def scrape_and_upload_to_activeloop(repo_request: GitHubRepoRequest):
|
|
25 |
# Add logic to scrape and upload to ActiveLoop
|
26 |
# Example: Scrape GitHub repo and upload to ActiveLoop
|
27 |
# Implement your scraping and upload logic here
|
28 |
-
github_service = InitiazlizeGithubService()
|
29 |
-
activeloop_service = InitiazlizeActiveloopService()
|
30 |
|
31 |
print(f"repo from user: {repo_request.githubRepoUrl}")
|
32 |
|
|
|
7 |
|
8 |
# Load environment variables
|
9 |
load_dotenv()
|
10 |
+
github_service = InitiazlizeGithubService()
|
11 |
+
activeloop_service = InitiazlizeActiveloopService()
|
12 |
|
13 |
app = FastAPI()
|
14 |
|
|
|
26 |
# Add logic to scrape and upload to ActiveLoop
|
27 |
# Example: Scrape GitHub repo and upload to ActiveLoop
|
28 |
# Implement your scraping and upload logic here
|
|
|
|
|
29 |
|
30 |
print(f"repo from user: {repo_request.githubRepoUrl}")
|
31 |
|