Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +12 -3
Dockerfile
CHANGED
@@ -1,17 +1,26 @@
|
|
1 |
FROM python:3.10
|
2 |
|
|
|
3 |
RUN useradd -m -u 1000 user
|
4 |
|
|
|
5 |
ENV HOME=/home/user
|
6 |
ENV PATH=/home/user/.local/bin:$PATH
|
7 |
|
|
|
8 |
USER user
|
9 |
|
|
|
10 |
WORKDIR $HOME/app
|
11 |
|
12 |
-
|
13 |
-
|
14 |
|
|
|
|
|
|
|
|
|
15 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
16 |
|
17 |
-
|
|
|
|
1 |
FROM python:3.10
|
2 |
|
3 |
+
# Create a user with home directory
|
4 |
RUN useradd -m -u 1000 user
|
5 |
|
6 |
+
# Set environment variables
|
7 |
ENV HOME=/home/user
|
8 |
ENV PATH=/home/user/.local/bin:$PATH
|
9 |
|
10 |
+
# Switch to the new user
|
11 |
USER user
|
12 |
|
13 |
+
# Set working directory
|
14 |
WORKDIR $HOME/app
|
15 |
|
16 |
+
# Clone the repository directly (public repo)
|
17 |
+
RUN git clone https://github.com/viratxd/deepseek2api.git
|
18 |
|
19 |
+
# Change working directory to the cloned repo
|
20 |
+
WORKDIR $HOME/app/deepseek2api
|
21 |
+
|
22 |
+
# Install dependencies
|
23 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
24 |
|
25 |
+
# Run the application
|
26 |
+
CMD ["python", "deepseek2api/app.py"]
|