Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
main
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
JIHONG MIN
main
Commits
7c8a642f
Commit
7c8a642f
authored
3 days ago
by
JIHONG MIN
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
29065c0b
Branches
patch-1
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
p4/Dockerfile.server
+41
-0
41 additions, 0 deletions
p4/Dockerfile.server
with
41 additions
and
0 deletions
p4/Dockerfile.server
0 → 100644
+
41
−
0
View file @
7c8a642f
FROM python:3.9
WORKDIR /
# 필요한 패키지 설치
RUN apt-get update && apt-get install -y wget default-jdk iputils-ping
RUN pip install grpcio grpcio-tools protobuf mysql-connector-python pandas pyarrow requests
# Hadoop 다운로드 및 설치
RUN wget https://archive.apache.org/dist/hadoop/common/hadoop-3.3.1/hadoop-3.3.1.tar.gz && \
tar -xzf hadoop-3.3.1.tar.gz -C /opt/ && \
rm hadoop-3.3.1.tar.gz
# 환경 변수 설정
ENV JAVA_HOME=/usr/lib/jvm/default-java
ENV HADOOP_HOME=/opt/hadoop-3.3.1
ENV PATH=$PATH:$HADOOP_HOME/bin
# HDFS 설정을 추가하여 명확하게 호스트 지정
RUN mkdir -p /opt/hadoop-3.3.1/etc/hadoop/
RUN echo '<?xml version="1.0" encoding="UTF-8"?>\n\
<configuration>\n\
<property>\n\
<name>fs.defaultFS</name>\n\
<value>hdfs://boss:9000</value>\n\
</property>\n\
</configuration>' > /opt/hadoop-3.3.1/etc/hadoop/core-site.xml
# 서버 코드 복사
COPY server.py /
COPY lender.proto /
COPY client.py /
# gRPC 생성
RUN python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. lender.proto
# 파티션 디렉토리 생성
RUN mkdir -p /partitions
# 서버 실행 (CLASSPATH를 설정한 후 실행)
CMD ["/bin/bash", "-c", "export CLASSPATH=$(hadoop classpath --glob) && python server.py"]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment