Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
|
@@ -26,8 +26,6 @@ COPY requirements.txt .
|
|
| 26 |
|
| 27 |
RUN uv pip install --system --upgrade pip setuptools wheel
|
| 28 |
RUN uv pip install --system torch==2.8.0+cpu --index-url https://download.pytorch.org/whl/cpu
|
| 29 |
-
|
| 30 |
-
# Install other requirements
|
| 31 |
RUN uv pip install --system -r requirements.txt
|
| 32 |
|
| 33 |
# ========== PRIVATE GIT CLONE BLOCK ==========
|
|
@@ -39,17 +37,18 @@ RUN mkdir -p /root/.ssh && \
|
|
| 39 |
chmod 600 /root/.ssh/id_rsa && \
|
| 40 |
ssh-keyscan github.com >> /root/.ssh/known_hosts
|
| 41 |
|
| 42 |
-
# Clone
|
| 43 |
-
RUN git clone git@github.com:Sisyetad/problemsolution.git ProblemSolution
|
|
|
|
|
|
|
| 44 |
# ============================================
|
| 45 |
|
| 46 |
-
# Copy remaining app code
|
| 47 |
-
COPY --chown=appuser:appgroup .
|
| 48 |
|
|
|
|
| 49 |
USER appuser
|
| 50 |
|
| 51 |
-
RUN chmod +x /app/ProblemSolution/entrypoint.sh
|
| 52 |
-
|
| 53 |
EXPOSE 8000
|
| 54 |
|
| 55 |
CMD ["sh", "/app/ProblemSolution/entrypoint.sh"]
|
|
|
|
| 26 |
|
| 27 |
RUN uv pip install --system --upgrade pip setuptools wheel
|
| 28 |
RUN uv pip install --system torch==2.8.0+cpu --index-url https://download.pytorch.org/whl/cpu
|
|
|
|
|
|
|
| 29 |
RUN uv pip install --system -r requirements.txt
|
| 30 |
|
| 31 |
# ========== PRIVATE GIT CLONE BLOCK ==========
|
|
|
|
| 37 |
chmod 600 /root/.ssh/id_rsa && \
|
| 38 |
ssh-keyscan github.com >> /root/.ssh/known_hosts
|
| 39 |
|
| 40 |
+
# Clone private repo into a folder
|
| 41 |
+
RUN git clone git@github.com:Sisyetad/problemsolution.git /app/ProblemSolution && \
|
| 42 |
+
chown -R appuser:appgroup /app/ProblemSolution && \
|
| 43 |
+
chmod +x /app/ProblemSolution/entrypoint.sh
|
| 44 |
# ============================================
|
| 45 |
|
| 46 |
+
# Copy remaining app code (avoid overwriting ProblemSolution)
|
| 47 |
+
COPY --chown=appuser:appgroup . /app/
|
| 48 |
|
| 49 |
+
# Switch to non-root user
|
| 50 |
USER appuser
|
| 51 |
|
|
|
|
|
|
|
| 52 |
EXPOSE 8000
|
| 53 |
|
| 54 |
CMD ["sh", "/app/ProblemSolution/entrypoint.sh"]
|