Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +2 -21
Dockerfile
CHANGED
@@ -1,28 +1,9 @@
|
|
1 |
-
# Use official Python image
|
2 |
FROM python:3.12-slim
|
3 |
|
4 |
-
# Install system dependencies for pandas and other packages
|
5 |
RUN apt-get update && \
|
6 |
apt-get install -y gcc g++ libpq-dev python3-dev libffi-dev build-essential
|
7 |
|
8 |
-
|
9 |
-
RUN useradd -m -u 1000 user
|
10 |
-
USER user
|
11 |
-
ENV HOME=/home/user \
|
12 |
-
PATH=/home/user/.local/bin:$PATH
|
13 |
-
|
14 |
-
# Set the working directory
|
15 |
-
WORKDIR $HOME/app
|
16 |
-
|
17 |
-
# Install dependencies
|
18 |
COPY --chown=user requirements.txt .
|
19 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
20 |
-
|
21 |
-
# Copy app code
|
22 |
-
COPY --chown=user . .
|
23 |
-
|
24 |
-
# Expose the app on port 7860
|
25 |
-
EXPOSE 7860
|
26 |
|
27 |
-
|
28 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
1 |
FROM python:3.12-slim
|
2 |
|
|
|
3 |
RUN apt-get update && \
|
4 |
apt-get install -y gcc g++ libpq-dev python3-dev libffi-dev build-essential
|
5 |
|
6 |
+
WORKDIR /home/user/app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
COPY --chown=user requirements.txt .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|